Ticket #1372: manipulators.py.patch
File manipulators.py.patch, 852 bytes (added by , 19 years ago) |
---|
-
manipulators.py
120 120 new_vals = new_data.get(f.name, ()) 121 121 else: 122 122 new_vals = new_data.getlist(f.name) 123 was_changed = getattr(new_object, 'set_%s' % f.name)(new_vals) 123 was_changed = getattr(new_object, f.name).clear() 124 for n in new_vals: 125 m = f.rel.to.objects.get(pk=n) 126 getattr(new_object, f.name).add(m) 127 # was_changed = getattr(new_object, 'set_%s' % f.name)(new_vals) 124 128 if self.change and was_changed: 125 129 self.fields_changed.append(f.verbose_name) 126 130