Re: [Django] #36522: Tuple lookups cannot handle right-hand sides mixing literal values and expressions (was: Assigning expressions to model fields does not work if the field participates in a composite primary key)

2 views
Skip to first unread message

Django

unread,
Jul 24, 2025, 3:03:37 PM7/24/25
to django-...@googlegroups.com
#36522: Tuple lookups cannot handle right-hand sides mixing literal values and
expressions
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
compositeprimarykey, F, composite | Unreviewed
primary key, rhs |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* keywords: compositeprimarykey, F => compositeprimarykey, F, composite
primary key, rhs
* summary:
Assigning expressions to model fields does not work if the field
participates in a composite primary key
=>
Tuple lookups cannot handle right-hand sides mixing literal values and
expressions

Comment:

Absolutely. Was really only expecting that this low-level failure might
reveal something deeper amiss, so thanks for identifying it so quickly!
--
Ticket URL: <https://code.djangoproject.com/ticket/36522#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages