[patch]Bug in the admin when deleting models with OneToOne
There's a typo in the code, this fixes it.
===================================================================
--- django/contrib/admin/views/main.py (revision 1565)
+++ django/contrib/admin/views/main.py (working copy)
@@ -564,7 +564,7 @@
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)
Change History
(4)
Summary: |
Bug in the admin when deleting models with OneToOne → [patch]Bug in the admin when deleting models with OneToOne
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Component: |
Admin interface → Generic views
|
milestone: |
→ Version 1.0
|
priority: |
highest → high
|
Severity: |
critical → normal
|
Type: |
defect → task
|
(In [1566]) Fixed #1022 -- Fixed bug in admin when deleting models with OneToOne. Thanks, Eric Moritz.