Ticket #34915: base.diff

File base.diff, 659 bytes (added by Tilman Koschnick, 13 months ago)
  • django/db/models/base.py

    diff --git a/django/db/models/base.py b/django/db/models/base.py
    index 27c9ff6461..eb21d5c722 100644
    a b class Model(metaclass=ModelBase):  
    849849            if update_fields and not updated:
    850850                raise DatabaseError("Save with update_fields did not affect any rows.")
    851851        if not updated:
    852             if meta.order_with_respect_to:
     852            if self._order is None and meta.order_with_respect_to:
    853853                # If this is a model with an order_with_respect_to
    854854                # autopopulate the _order field
    855855                field = meta.order_with_respect_to
Back to Top