fix: default values in subordinate entities based on static_filtering, add: button visibility callbacks in entities' forms
This commit is contained in:
@@ -57,12 +57,10 @@ async def deserialize[T](session: AsyncSession, type_: type[T], value: str = Non
|
||||
elif type_ is datetime:
|
||||
if is_optional and not value:
|
||||
return None
|
||||
if value[-3] == ":":
|
||||
return datetime.strptime(value, "%Y-%m-%d %H:%M:%S")
|
||||
elif value[-3] == "-":
|
||||
if value[-3] == "-":
|
||||
return datetime.strptime(value, "%Y-%m-%d %H-%M")
|
||||
else:
|
||||
raise ValueError("Invalid datetime format")
|
||||
return datetime.fromisoformat(value)
|
||||
elif type_ is bool:
|
||||
return value == "True"
|
||||
elif type_ is Decimal:
|
||||
|
||||
Reference in New Issue
Block a user