Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1316 closed defect (fixed)

[patch] one more bug fix for admin interface

Reported by: jpaulofarias at gmail dot com Owned by: Adrian Holovaty
Component: contrib.admin Version: magic-removal
Severity: normal Keywords: admin, db
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Removed one more reference to 'get_%s_list' when it should be '%s_set'.all()

Index: django/db/models/
--- django/db/models/	(revision 2230)
+++ django/db/models/	(working copy)
@@ -211,7 +211,7 @@
-                for sub_obj in getattr(self, 'get_%s_list' % rel_opts_name)():
+                for sub_obj in getattr(self, '%s_set' % rel_opts_name).all():
     def delete(self):

Change History (3)

comment:1 Changed 12 years ago by Adrian Holovaty

I believe the logic that creates the '_set' name is isolated in one place; i.e., '_set' shouldn't be hard-coded here.

comment:2 Changed 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

Fixed in [2248].

comment:3 Changed 12 years ago by Adrian Holovaty

milestone: Version 0.91

Milestone Version 0.91 deleted

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