Opened 19 years ago

Closed 19 years ago

Last modified 18 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: no UI/UX: no

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 by rjwittams, 19 years ago

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

comment:2 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

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

comment:3 by anonymous, 18 years ago

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

comment:4 by (none), 18 years ago

milestone: Version 1.0

Milestone Version 1.0 deleted

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