#31919: Django fails with FieldError: Expression contains mixed types: IntegerField, AutoField. You must set output_field. -------------------------------------+------------------------------------- Reporter: StefanosChaliasos | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: master (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 Simon Charette):
* type: Uncategorized => Bug * component: Uncategorized => Database layer (models, ORM) * stage: Unreviewed => Accepted Comment: This is likely a regression caused by 1e38f1191de21b6e96736f58df57dfb851a28c1f Stefanos, could you confirm the following patch addresses your issue {{{#!diff diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index a9768919a2..90d90119d0 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -421,6 +421,7 @@ class Expression(BaseExpression, Combinable): _connector_combinators = { connector: [ + (fields.IntegerField, fields.IntegerField, fields.IntegerField), (fields.IntegerField, fields.DecimalField, fields.DecimalField), (fields.DecimalField, fields.IntegerField, fields.DecimalField), (fields.IntegerField, fields.FloatField, fields.FloatField), }}} -- Ticket URL: <https://code.djangoproject.com/ticket/31919#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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/075.a8c6ee06983b737c4f550421e92380c8%40djangoproject.com.