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
This commit is contained in:
Adrian Holovaty 2006-02-23 19:14:05 +00:00
parent ce18ec917c
commit 208ea7bacb
1 changed files with 1 additions and 1 deletions

View File

@ -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") raise AttributeError("Generic edit view must be called with either an object_id or a slug/slug_field")
lookup_kwargs.update(extra_lookup_kwargs) lookup_kwargs.update(extra_lookup_kwargs)
try: try:
object = model._default_manager.get_object(**lookup_kwargs) object = model.objects.get(**lookup_kwargs)
except ObjectDoesNotExist: except ObjectDoesNotExist:
raise Http404, "No %s found for %s" % (model._meta.verbose_name, lookup_kwargs) raise Http404, "No %s found for %s" % (model._meta.verbose_name, lookup_kwargs)