Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#1022 closed task (fixed)

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

Reported by: Eric Moritz Owned by: adrian
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 10 years ago by rjwittams

  • Summary changed from Bug in the admin when deleting models with OneToOne to [patch]Bug in the admin when deleting models with OneToOne

comment:2 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 9 years ago by anonymous

  • Component changed from Admin interface to Generic views
  • milestone set to Version 1.0
  • priority changed from highest to high
  • Severity changed from critical to normal
  • Type changed from defect to task

comment:4 Changed 9 years ago by anonymous

  • milestone Version 1.0 deleted

Milestone Version 1.0 deleted

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