#18306: Deferred models should automatically issue update_fields when saving
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  akaariai
         Type:                       |                   Status:  reopened
  Cleanup/optimization               |                  Version:  master
    Component:  Database layer       |               Resolution:
  (models, ORM)                      |             Triage Stage:  Ready for
     Severity:  Normal               |  checkin
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by akaariai):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


Comment:

 I have reviewed and polished the patch written by niwi. I created
 [https://github.com/django/django/pull/213 a pull request] as I think the
 feature is now ready for commit. Please review, or at least do a cursory
 glance for obvious mistakes.

 I wonder if I should squash the two commits into one...

 I ended up getting rid of the model._state.deferred_fields and instead
 using the instance's and class' dict to check the deferred state of the
 object when saving. The idea of using ._state was mine (or at least
 encouraged by me), sorry for pushing the wrong solution.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18306#comment:18>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to