Converting ApprovalModel to Approval in order to serialize properly the result
This commit is contained in:
parent
cd16b984e0
commit
b2e56f797b
|
@ -20,7 +20,7 @@ from crc.services.ldap_service import LdapService
|
|||
from crc.services.protocol_builder import ProtocolBuilderService
|
||||
from crc.services.workflow_processor import WorkflowProcessor
|
||||
from crc.services.approval_service import ApprovalService
|
||||
from crc.models.approval import ApprovalSchema
|
||||
from crc.models.approval import Approval
|
||||
|
||||
|
||||
class StudyService(object):
|
||||
|
@ -57,7 +57,8 @@ class StudyService(object):
|
|||
study.categories = StudyService.get_categories()
|
||||
workflow_metas = StudyService.__get_workflow_metas(study_id)
|
||||
study.files = FileService.get_files_for_study(study.id)
|
||||
study.approvals = ApprovalService.get_approvals_for_study(study.id)
|
||||
approvals = ApprovalService.get_approvals_for_study(study.id)
|
||||
study.approvals = [Approval.from_model(approval_model) for approval_model in approvals]
|
||||
|
||||
files = FileService.get_files_for_study(study.id)
|
||||
files = (File.from_models(model, FileService.get_file_data(model.id),
|
||||
|
|
Loading…
Reference in New Issue