#18362: model save with update_fields should accept both field.name and
field.attname
----------------------------------------------+--------------------
     Reporter:  akaariai                      |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  master
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 Currently only field.name is accepted in update_fields argument. It seems
 field.attname should be accepted, too. Most commonly this will be
 encountered when trying to save a related field by "_id" appendix - for
 example update_fields=['profile'] will work, but
 update_fields['profile_id'] will not work currently.

 In my opinion this should work, as profile_id works in many other places,
 too, and this could be useful for automatic tracking of field changes for
 example.

 Refs #4102, #18306.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18362>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to