Ticket #1511: manipulators-bool-changed.diff
File manipulators-bool-changed.diff, 983 bytes (added by , 18 years ago) |
---|
-
manipulators.py
109 109 if self.change: 110 110 self.fields_added, self.fields_changed, self.fields_deleted = [], [], [] 111 111 for f in self.opts.fields: 112 if not f.primary_key and str(getattr(self.original_object, f.attname)) != str(getattr(new_object, f.attname)): 112 if type(getattr(new_object, f.attname)) is bool: 113 if not f.primary_key and getattr(self.original_object, f.attname) != getattr(new_object, f.attname): 114 self.fields_changed.append(f.verbose_name) 115 elif not f.primary_key and str(getattr(self.original_object, f.attname)) != str(getattr(new_object, f.attname)): 113 116 self.fields_changed.append(f.verbose_name) 114 117 115 118 # Save many-to-many objects. Example: Set sites for a poll.