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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28385, comment 5

    v2 v3  
    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 updates model via `return obj` without `updating pk` logic.
    19 If `pk` isn't set as like as `natural key` implementation - it updates model via `return obj` without `updating pk` logic.
    20 
    21 If `pk` isn't set, but `natural key` implementation exists - go to `updating pk` logic.
     18If `pk` isn't set, but `natural key` implementation exists - it goes to `updating pk` logic.
    2219
    2320I did test manually, it seems bug is fixed.
Back to Top