Do not insert values for Function fields in history table

Since 49748579c23a Function fields can have an SQL type so it is not enough to
distinct the columns that must be inserted as first record in history table.

Closes #14636
This commit is contained in:
Cédric Krier
2026-03-02 09:55:54 +01:00
parent 204c5f826d
commit 126d71063c
+1 -1
View File
@@ -583,7 +583,7 @@ class ModelSQL(ModelStorage):
*h_table.select(h_table.id, limit=1))
if not cursor.fetchone():
columns = [n for n, f in cls._fields.items()
if f.sql_type()]
if f.sql_type() and not isinstance(f, fields.Function)]
cursor.execute(*h_table.insert(
[Column(h_table, c) for c in columns],
sql_table.select(*(Column(sql_table, c)