#33450: Integer primary key is wrongly casted to UUID when filtering
GenericRelation on model with UUID primary key.
-------------------------------------+-------------------------------------
Reporter: Santos Gallegos | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 4.0
(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
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* cc: Timur (added)
* stage: Unreviewed => Accepted
Comment:
Thanks for the report! Regression in
1afbc96a75bd1765a56054f57ea2d4b238af3f4d.
While checking this report I found another issue that's related but it's
not a regression:
{{{#!python
>>> integration = TIntegration.objects.create()
>>> tag = integration.tags.create()
>>> tag.integration.first()
...
File "/django/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: operator does not exist: uuid = numeric
LINE 1: ...ntent_type_id" = 7)) WHERE "test_33450_ttag"."id" = 10341161...
}}}
so cast to `uuid` is missing here 🤔.
--
Ticket URL: <https://code.djangoproject.com/ticket/33450#comment:1>
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/064.b32f582c356101acab9f83d6e50a844e%40djangoproject.com.