[Django] #33010: id to uuid type casting bug in Django 2.2

11 views
Skip to first unread message

Django

unread,
Aug 10, 2021, 10:03:24 AM8/10/21
to django-...@googlegroups.com
#33010: id to uuid type casting bug in Django 2.2
-------------------------------------+-------------------------------------
Reporter: Stygmate | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 2.2
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
in some case Django try to convert simple incremental integer id to UUID.

this problem was encountered while trying django-computedfields lib.
here is the test project, initialy created to check if the bug come from
django-computedfields: https://github.com/stygmate/dcftest
(check the models.py in dcfapp)
when doing:
ModelA.objects.filter(modelb=some_modelb_instance)
the SQL query generated is casting id to uuid resulting in
0000....-.....-0001 and in a query error.

Things seems to work well with django 3.2, can someone backport the
correction to django 2.2 ?

--
Ticket URL: <https://code.djangoproject.com/ticket/33010>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 10, 2021, 11:23:45 AM8/10/21
to django-...@googlegroups.com
#33010: id to uuid type casting bug in Django 2.2
-------------------------------------+-------------------------------------
Reporter: Stygmate | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix


Comment:

Thanks for the report, it was fixed in
325d5d64452118d89624d8b4c8679f0d2cb3d6d6 (see #30477). Unfortunately, the
issue has been present since the feature was introduced. Per our
backporting policy this means it doesn't qualify for a backport to 2.2.x.
See https://docs.djangoproject.com/en/stable/internals/release-process/
for more details. Moreover Django 2.2 is in extended support so it doesn't
receive bugfixes anymore (except security patches).

--
Ticket URL: <https://code.djangoproject.com/ticket/33010#comment:1>

Reply all
Reply to author
Forward
0 new messages