#36207: refresh_from_db() doesn't refresh ForeignObject relations
-------------------------------------+-------------------------------------
     Reporter:  Jacob Walls          |                    Owner:  Gregory
                                     |  Mariani
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  5.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

 Thanks for picking this up. I think being able to set `.user = None` is
 important. Maybe we need to adjust this
 
[https://github.com/django/django/blob/51cab4ad51616f8fdb050631be5c710b93685ec3/django/db/models/fields/related_descriptors.py#L207
 query[ from `.get()` to `.filter(...).first()` to support that? The test
 model I was reusing was not nullable, but you can imagine another test
 model having a nullable ForeignObject.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36207#comment:7>
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019533b7dfa0-038e25ad-f72c-40bd-b282-74c4ba7a920c-000000%40eu-central-1.amazonses.com.

Reply via email to