Fixed stuff
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user