mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-24 13:48:30 +00:00
FileModel => DocumentModel
Don't need separate call for data
This commit is contained in:
parent
aa52b7b790
commit
0c313f44b2
@ -5,7 +5,7 @@ from SpiffWorkflow.exceptions import WorkflowTaskExecException
|
|||||||
|
|
||||||
from crc import session
|
from crc import session
|
||||||
from crc.api.common import ApiError
|
from crc.api.common import ApiError
|
||||||
from crc.models.file import CONTENT_TYPES, FileModel
|
from crc.models.file import CONTENT_TYPES, DocumentModel
|
||||||
from crc.models.workflow import WorkflowModel
|
from crc.models.workflow import WorkflowModel
|
||||||
from crc.scripts.script import Script
|
from crc.scripts.script import Script
|
||||||
from crc.services.jinja_service import JinjaService
|
from crc.services.jinja_service import JinjaService
|
||||||
@ -99,10 +99,9 @@ Takes two arguments:
|
|||||||
if file_id is not None and isinstance(file_id, int):
|
if file_id is not None and isinstance(file_id, int):
|
||||||
if not task.workflow.data[WorkflowProcessor.VALIDATION_PROCESS_KEY]:
|
if not task.workflow.data[WorkflowProcessor.VALIDATION_PROCESS_KEY]:
|
||||||
# Get the actual image data
|
# Get the actual image data
|
||||||
image_file_model = session.query(FileModel).filter_by(id=file_id).first()
|
image_file_model = session.query(DocumentModel).filter_by(id=file_id).first()
|
||||||
image_file_data_model = UserFileService.get_file_data(file_id, image_file_model)
|
if image_file_model is not None:
|
||||||
if image_file_data_model is not None:
|
image_file_data.append(image_file_model)
|
||||||
image_file_data.append(image_file_data_model)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise ApiError(
|
raise ApiError(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user