Opened 3 years ago

Closed 3 years ago

#33010 closed Bug (wontfix)

id to uuid type casting bug in Django 2.2

Reported by: Stygmate Owned by: nobody
Component: Database layer (models, ORM) Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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 ?

Change History (1)

comment:1 by Mariusz Felisiak, 3 years ago

Resolution: wontfix
Status: newclosed

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).

Note: See TracTickets for help on using tickets.
Back to Top