#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: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):
* needs_better_patch: 0 => 1
Comment:
I think I confounded things by involving `None` in my draft test. I didn't
notice that both sides of the relation involved CompositePrimaryKey.
Django doesn't support setting a model's PK to None and then refreshing
from db--and I'm not suggesting to add support for that.
I left a review on the PR improve the assertion and suggest an alternative
approach. It works for me, but some further investigation/validation would
be very welcome.
--
Ticket URL: <https://code.djangoproject.com/ticket/36207#comment:13>
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/0107019538c35c85-8d19751b-899c-4a13-951c-5f6dfa2bb43b-000000%40eu-central-1.amazonses.com.