From 208ea7bacba1d04abe263918e95530d1e0d527da Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 23 Feb 2006 19:14:05 +0000 Subject: [PATCH] magic-removal: Fixed #1388 -- Fixed old-style DB lookup in create_update generic view. Thanks, Russell git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2373 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/views/generic/create_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/views/generic/create_update.py b/django/views/generic/create_update.py index a53026b44f..7c4a6426a6 100644 --- a/django/views/generic/create_update.py +++ b/django/views/generic/create_update.py @@ -96,7 +96,7 @@ def update_object(request, model, object_id=None, slug=None, raise AttributeError("Generic edit view must be called with either an object_id or a slug/slug_field") lookup_kwargs.update(extra_lookup_kwargs) try: - object = model._default_manager.get_object(**lookup_kwargs) + object = model.objects.get(**lookup_kwargs) except ObjectDoesNotExist: raise Http404, "No %s found for %s" % (model._meta.verbose_name, lookup_kwargs)