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:
parent
ce18ec917c
commit
208ea7bacb
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue