#35011: Queryset union can fail depending on the field type and/or order -------------------------------------+------------------------------------- Reporter: Thierry | Owner: nobody Bastian | Type: Bug | Status: new Component: Database | Version: 5.0 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 | -------------------------------------+------------------------------------- Hello, I was porting my code to Django 5 and there is an issue with the way queryset are union'ed. Essentially it ends up trying to convert datetime to int, which is strange. I did not get time to investigate the issue myself. You can note that the order of fields we use in the .values call affects the behaviour (which is also highly unexpected).
To reproduce the issue, simply untar the attached example, run migrate then test. -- Ticket URL: <https://code.djangoproject.com/ticket/35011> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018c35cbc3a2-ea0cb850-5083-4291-9def-6068ec2a9473-000000%40eu-central-1.amazonses.com.