Ticket #10967: simple-patch-in-save_base.diff
File simple-patch-in-save_base.diff, 741 bytes (added by , 16 years ago) |
---|
-
base.py
457 457 if (force_update or (not force_insert and 458 458 manager.filter(pk=pk_val).extra(select={'a': 1}).values('a').order_by())): 459 459 # It does already exist, so do an UPDATE. 460 if force_update ornon_pks:460 if force_update and non_pks: 461 461 values = [(f, None, (raw and getattr(self, f.attname) or f.pre_save(self, False))) for f in non_pks] 462 462 rows = manager.filter(pk=pk_val)._update(values) 463 463 if force_update and not rows: