Django

Code

Ticket #1022 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: Eric Moritz Assigned to: adrian
Milestone: Component: Generic views
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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)

Attachments

Change History

12/07/05 16:58:49 changed 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.

12/07/05 17:36:32 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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

07/07/06 14:31:57 changed by anonymous

  • priority changed from highest to high.
  • type changed from defect to task.
  • component changed from Admin interface to Generic views.
  • severity changed from critical to normal.
  • milestone set to Version 1.0.

01/17/07 16:12:17 changed by

  • milestone deleted.

Milestone Version 1.0 deleted


Add/Change #1022 ([patch]Bug in the admin when deleting models with OneToOne)




Change Properties
Action