[FIX] orm: do not aggregate non-stored columns
Columns defined in the new api as interger, computed and non-stored should not be aggregated in read_group. Fallback on False if column is None Fixes #3972, opw 619536
This commit is contained in:
parent
1d64b65103
commit
33c8aae8e4
|
@ -2109,7 +2109,7 @@ class BaseModel(object):
|
|||
if f not in groupby_fields
|
||||
if f in self._fields
|
||||
if self._fields[f].type in ('integer', 'float')
|
||||
if getattr(self._fields[f].base_field.column, '_classic_write')
|
||||
if getattr(self._fields[f].base_field.column, '_classic_write', False)
|
||||
]
|
||||
|
||||
field_formatter = lambda f: (self._fields[f].group_operator or 'sum', self._inherits_join_calc(f, query), f)
|
||||
|
|
Loading…
Reference in New Issue