fixing an untyped method.
This commit is contained in:
parent
3a09b45765
commit
e06500821e
|
@ -97,6 +97,7 @@ from spiffworkflow_backend.services.service_task_service import ServiceTaskDeleg
|
||||||
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
||||||
from spiffworkflow_backend.services.user_service import UserService
|
from spiffworkflow_backend.services.user_service import UserService
|
||||||
|
|
||||||
|
|
||||||
# Sorry about all this crap. I wanted to move this thing to another file, but
|
# Sorry about all this crap. I wanted to move this thing to another file, but
|
||||||
# importing a bunch of types causes circular imports.
|
# importing a bunch of types causes circular imports.
|
||||||
|
|
||||||
|
@ -178,7 +179,7 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore
|
||||||
)
|
)
|
||||||
return Script.generate_augmented_list(script_attributes_context)
|
return Script.generate_augmented_list(script_attributes_context)
|
||||||
|
|
||||||
def evaluate(self, task: SpiffTask, expression: str, external_methods=None) -> Any:
|
def evaluate(self, task: SpiffTask, expression: str, external_methods: Any = None) -> Any:
|
||||||
"""Evaluate."""
|
"""Evaluate."""
|
||||||
return self._evaluate(expression, task.data, task, external_methods)
|
return self._evaluate(expression, task.data, task, external_methods)
|
||||||
|
|
||||||
|
@ -302,7 +303,7 @@ class ProcessInstanceProcessor:
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
bpmn_json_length = len(process_instance_model.bpmn_json.encode("utf-8"))
|
bpmn_json_length = len(process_instance_model.bpmn_json.encode("utf-8"))
|
||||||
megabyte = float(1024**2)
|
megabyte = float(1024 ** 2)
|
||||||
json_size = bpmn_json_length / megabyte
|
json_size = bpmn_json_length / megabyte
|
||||||
if json_size > 1:
|
if json_size > 1:
|
||||||
wf_json = json.loads(process_instance_model.bpmn_json)
|
wf_json = json.loads(process_instance_model.bpmn_json)
|
||||||
|
|
Loading…
Reference in New Issue