fixed mandate flag
This commit is contained in:
parent
1f3746aef5
commit
7532841d9d
1 changed files with 8 additions and 0 deletions
|
|
@ -89,6 +89,14 @@ class Mandate(BaseModel):
|
|||
json_schema_extra={"frontend_type": "checkbox", "frontend_readonly": True, "frontend_required": False}
|
||||
)
|
||||
|
||||
@field_validator('isSystem', mode='before')
|
||||
@classmethod
|
||||
def _coerceIsSystem(cls, v):
|
||||
"""Coerce None to False (for existing DB records without isSystem field)."""
|
||||
if v is None:
|
||||
return False
|
||||
return v
|
||||
|
||||
|
||||
registerModelLabels(
|
||||
"Mandate",
|
||||
|
|
|
|||
Loading…
Reference in a new issue