#11541: F() expressions don't allow assignment of Foreign Key values on
instances
-------------------------------------+-------------------------------------
Reporter: Russell Keith-Magee | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.1-beta
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Abhijeet Viswa):
Marten Kenbeek pointed out to me that `F`expression can be assigned to the
`attname` attribute of the Model instance. So,
`test_gmbh.point_of_contact_id` can be assigned `F('ceo')` to have the
intended effect. However, I don't think this is documented. Would
documenting this be enough to close this ticket? Or should F expressions
be assignable to the relation descriptors?
--
Ticket URL: <https://code.djangoproject.com/ticket/11541#comment:9>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/066.7832ec1d28c7aa656e21a6ad5b5c6fac%40djangoproject.com.