#27846: refresh_from_db() doesn't clear reverse OneToOneFields
-------------------------------------+-------------------------------------
     Reporter:  Keith Hostetler      |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.10
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  refresh_from_db      |             Triage Stage:  Accepted
  OneToOneField                      |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 I think this is fixable but I'm not sure without trying to write a patch.
 This case may be discussed in ticket:901#comment:36 It looks like the
 issue is that `refresh_from_db()`
 
[https://github.com/django/django/blob/a7214f0e84913a27e0b73de89d4c827ef1c53b94/django/db/models/base.py#L609-L620
 clears concrete fields] but doesn't clear reverse relations.

--
Ticket URL: <https://code.djangoproject.com/ticket/27846#comment:3>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.5e0ea64eb315e006860104a7762e5ae7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to