Do not convert integer value from binary function field

Binary fields can have two types bytes and integer when only the size is
requested. So integer value should not be converted to bytes.

Closes #14100
This commit is contained in:
Cédric Krier
2025-07-03 23:10:30 +02:00
parent 8ce69b1055
commit 750bfe2045
+4 -1
View File
@@ -158,7 +158,10 @@ class Function(Field):
elif (field._py_type
and value is not None
and not isinstance(value, field._py_type)):
value = field._py_type(value)
if field._type == 'binary' and isinstance(value, int):
pass
else:
value = field._py_type(value)
return value
def convert_dict(values, name):