﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34160	Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.	Martin Lehoux	Martin Lehoux	"Hi,

During an update from Django 4.0.8 to 4.1.3, an unexpected bug occured in our tests.

{{{
django.core.exceptions.FieldError: Expression contains mixed types: IntegerField, SmallIntegerField. You must set output_field.
}}}

I understand what it means, but I couldn't find what changed between these two versions that could explain the appearance of this error.


{{{
Case(
    When(
        True,
         then=F(""inventory_count"") + Value(1),
    ),
    default=F(""inventory_count""),
)
}}}

I could easily fix it with 

{{{
Case(
    When(
        True,
         then=F(""inventory_count"") + Value(1),
    ),
    default=F(""inventory_count""),
    output_field=IntegerField(),
)
}}}"	Bug	closed	Database layer (models, ORM)	4.1	Release blocker	wontfix		Simon Charette Luke Plant	Unreviewed	0	0	0	0	0	0
