Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1372 closed defect (fixed)

Magic-Removal: ManyToMany Patch

Reported by: donald-curtis@… Owned by: Adrian Holovaty
Component: Core (Other) Version: magic-removal
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


--- (revision 2330)
+++ (working copy)
@@ -120,7 +120,11 @@

new_vals = new_data.get(, ())


new_vals = new_data.getlist(

  • was_changed = getattr(new_object, 'set_%s' %

+ was_changed = getattr(new_object,
+ for n in new_vals:
+ m =
+ getattr(new_object,
+ # was_changed = getattr(new_object, 'set_%s' %

if self.change and was_changed:


Attachments (2) (852 bytes) - added by donald-curtis@… 14 years ago.
The Patch File! (1.0 KB) - added by matt 14 years ago.

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by donald-curtis@…

Attachment: added

The Patch File!

comment:1 Changed 14 years ago by matt

This does indeed fix the first error in #1359, though raw_id_admin=True still errors out. Awesome work, dcurtis!

Changed 14 years ago by matt

Attachment: added

comment:2 Changed 14 years ago by matt

The above patch, fixes the situation where raw_id_admin=True . This patch along with dcurtis' fixes both problems in #1359.

comment:3 Changed 14 years ago by Luke Plant

priority: highnormal
Severity: majornormal

The patches don't take account of the 'was_changed' variable. The return value of .clear() isn't actually defined yet, and it wouldn't be enough anyway - a bit more work is needed on this. (I have already noted the issues in a thread on django-dev: )

comment:4 Changed 14 years ago by Christopher Lenz <cmlenz@…>

I've marked #1386 as a duplicate of this ticket.

comment:5 Changed 14 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2374]) magic-removal: Fixed #1372 -- Got many-to-many fields working in manipulators

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