Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#1022 closed task (fixed)

[patch]Bug in the admin when deleting models with OneToOne

Reported by: Eric Moritz Owned by: Adrian Holovaty
Component: Generic views Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

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)

comment:1 Changed 11 years ago by rjwittams

Summary: Bug in the admin when deleting models with OneToOne[patch]Bug in the admin when deleting models with OneToOne

comment:2 Changed 11 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [1566]) Fixed #1022 -- Fixed bug in admin when deleting models with OneToOne. Thanks, Eric Moritz.

comment:3 Changed 10 years ago by anonymous

Component: Admin interfaceGeneric views
milestone: Version 1.0
priority: highesthigh
Severity: criticalnormal
Type: defecttask

comment:4 Changed 10 years ago by (none)

milestone: Version 1.0

Milestone Version 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top