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 = []
|
depends_on = []
|
||||||
provides = []
|
provides = []
|
||||||
|
|
||||||
status = EnumField(WorkflowTaskStatus, is_hashed=False)
|
status = EnumField(WorkflowTaskStatus, is_hashed=False, default=WorkflowTaskStatus.UNKNOWN)
|
||||||
exited_at = DateTimeField(is_hashed=False)
|
exited_at = DateTimeField(is_hashed=False)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -40,7 +40,7 @@ class Task(TopLevelObject):
|
|||||||
started_at = DateTimeField()
|
started_at = DateTimeField()
|
||||||
completed_at = DateTimeField()
|
completed_at = DateTimeField()
|
||||||
|
|
||||||
status = EnumField(TaskStatus)
|
status = EnumField(TaskStatus, default=TaskStatus.UNKNOWN)
|
||||||
messages = ListField(StringField())
|
messages = ListField(StringField())
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user