Changes between Version 1 and Version 2 of Ticket #28385, comment 5


Ignore:
Timestamp:
Jul 23, 2017, 9:50:25 AM (7 years ago)
Author:
Dmytryi Striletskyi

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28385, comment 5

    v1 v2  
    1616>     if obj.pk is None or (hasattr(Model, 'natural_key') and hasattr(Model._default_manager, 'get_by_natural_key')):
    1717
    18 If  `pk` is set - it is update model via `return obj` without `updating pk` logic.
    19 If `pk` isn't set, but `natural key` implementation exists - `if False or True` (return `True`) - go to `updating pk` logic.
     18If `pk` is set - it updates model via `return obj` without `updating pk` logic.
     19If `pk` isn't set as like as `natural key` implementation - it updates model via `return obj` without `updating pk` logic.
     20
     21If `pk` isn't set, but `natural key` implementation exists - go to `updating pk` logic.
    2022
    2123I did test manually, it seems bug is fixed.
Back to Top