#31866: Proxy model is ignored when referenced in select_for_update's 'of'
parameter
-------------------------------------+-------------------------------------
Reporter: Daniel | Owner: nobody
Hillier |
Type: Bug | Status: new
Component: Database | Version: 3.1
layer (models, ORM) | Keywords: proxy
Severity: Normal | select_for_update
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When referring to a proxy model as a FK in a `select_for_update()` call,
the proxy model's table is silently omitted from the `FOR UPDATE` clause
in the resulting SQL.
Also, if a model has a FK to a proxy model, the `FieldError` that is
supposed to be raised when an any inappropriate field is found in a
`select_for_update()` call will crash with `AttributeError: 'NoneType'
object has no attribute 'name'` .
Tested with postgres but I don't think this is specific to that db.
--
Ticket URL: <https://code.djangoproject.com/ticket/31866>
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/050.b7356049d5b6a4a06700e1dcd9075004%40djangoproject.com.