Fixed stuff

This commit is contained in:
2020-04-14 17:26:33 +02:00
parent 8a82bf07c5
commit 536fc2a164
5 changed files with 25 additions and 20 deletions

View File

@@ -5,5 +5,11 @@ from model import AIModel
class AIModelSchema(ModelSchema):
default = fields.Method("boolize_default", dump_only=True)
def boolize_default(self, ai_model) -> bool:
return bool(ai_model.default)
class Meta:
model = AIModel