Add defaults to enum fields to stop errors on creation
This commit is contained in:
parent
4b5177e16b
commit
884d949d04
@ -29,7 +29,7 @@ class WorkflowTask(EmbeddedObject):
|
||||
depends_on = []
|
||||
provides = []
|
||||
|
||||
status = EnumField(WorkflowTaskStatus, is_hashed=False)
|
||||
status = EnumField(WorkflowTaskStatus, is_hashed=False, default=WorkflowTaskStatus.UNKNOWN)
|
||||
exited_at = DateTimeField(is_hashed=False)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -40,7 +40,7 @@ class Task(TopLevelObject):
|
||||
started_at = DateTimeField()
|
||||
completed_at = DateTimeField()
|
||||
|
||||
status = EnumField(TaskStatus)
|
||||
status = EnumField(TaskStatus, default=TaskStatus.UNKNOWN)
|
||||
messages = ListField(StringField())
|
||||
|
||||
def run(self):
|
||||
|
Loading…
Reference in New Issue
Block a user