loaded values from default/studio/project are tried to convert

This commit is contained in:
iLLiCiTiT 2021-03-19 12:04:30 +01:00
parent af1c18db1f
commit 68d20b910e

View file

@ -375,9 +375,13 @@ class BaseItemEntity(BaseEntity):
if value is NOT_SET:
return value
# Validate value type and return value itself if is valid.
if self.is_value_valid_type(value):
return value
try:
new_value = self.convert_to_valid_type(value)
except InvalidValueType:
new_value = NOT_SET
if new_value is not NOT_SET:
return new_value
# Warning log about invalid value type.
self.log.warning(