Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 9832abf6b49af4dcefc1926461d456cc5051a81e 1 parent 668e8b3
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/views/main.py
View
2  django/contrib/admin/views/main.py
@@ -564,7 +564,7 @@ def _get_deleted_objects(deleted_objects, perms_needed, user, obj, opts, current
except ObjectDoesNotExist:
pass
else:
- if rel_opts.admin:
+ if related.opts.admin:
p = '%s.%s' % (related.opts.app_label, related.opts.get_delete_permission())
if not user.has_perm(p):
perms_needed.add(related.opts.verbose_name)
Please sign in to comment.
Something went wrong with that request. Please try again.