We now store type as a string, not an Enum
This commit is contained in:
parent
ba2eef0ec9
commit
9097851ae1
|
@ -40,7 +40,7 @@ def add_file(spec_id):
|
|||
workflow_spec = workflow_spec_service.get_spec(spec_id)
|
||||
file = connexion.request.files['file']
|
||||
file = SpecFileService.add_file(workflow_spec, file.filename, file.stream.read())
|
||||
if not workflow_spec.primary_process_id and file.type == FileType.bpmn:
|
||||
if not workflow_spec.primary_process_id and file.type == FileType.bpmn.value:
|
||||
SpecFileService.set_primary_bpmn(workflow_spec, file.name)
|
||||
workflow_spec_service.update_spec(workflow_spec)
|
||||
return FileSchema().dump(file)
|
||||
|
|
|
@ -148,7 +148,7 @@ class File(object):
|
|||
instance = cls()
|
||||
instance.name = file_name
|
||||
instance.content_type = content_type
|
||||
instance.type = file_type
|
||||
instance.type = file_type.value
|
||||
instance.document = {}
|
||||
instance.last_modified = last_modified
|
||||
instance.size = file_size
|
||||
|
|
Loading…
Reference in New Issue