Ticket #10967: simple-patch-in-save_base.diff

File simple-patch-in-save_base.diff, 741 bytes (added by Lorenzo Gil Sanchez, 16 years ago)

Patch that fix this error

  • base.py

     
    457457                if (force_update or (not force_insert and
    458458                        manager.filter(pk=pk_val).extra(select={'a': 1}).values('a').order_by())):
    459459                    # It does already exist, so do an UPDATE.
    460                     if force_update or non_pks:
     460                    if force_update and non_pks:
    461461                        values = [(f, None, (raw and getattr(self, f.attname) or f.pre_save(self, False))) for f in non_pks]
    462462                        rows = manager.filter(pk=pk_val)._update(values)
    463463                        if force_update and not rows:
Back to Top