mirror of https://github.com/django/django.git
Fixed #1022 -- Fixed bug in admin when deleting models with OneToOne. Thanks, Eric Moritz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
668e8b3df9
commit
9832abf6b4
|
@ -564,7 +564,7 @@ def _get_deleted_objects(deleted_objects, perms_needed, user, obj, opts, current
|
||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if rel_opts.admin:
|
if related.opts.admin:
|
||||||
p = '%s.%s' % (related.opts.app_label, related.opts.get_delete_permission())
|
p = '%s.%s' % (related.opts.app_label, related.opts.get_delete_permission())
|
||||||
if not user.has_perm(p):
|
if not user.has_perm(p):
|
||||||
perms_needed.add(related.opts.verbose_name)
|
perms_needed.add(related.opts.verbose_name)
|
||||||
|
|
Loading…
Reference in New Issue