From e72cf27fe3c06c68cc0597c6eb95c0bf8dec31fd Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Wed, 13 Oct 2021 11:41:44 -0400 Subject: [PATCH] Return email model from email script. --- crc/scripts/email.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crc/scripts/email.py b/crc/scripts/email.py index bca72827..8ab14f45 100644 --- a/crc/scripts/email.py +++ b/crc/scripts/email.py @@ -3,6 +3,7 @@ import traceback from crc import app, session from crc.api.common import ApiError +from crc.models.email import EmailModelSchema from crc.models.file import FileModel, CONTENT_TYPES from crc.models.workflow import WorkflowModel from crc.services.document_service import DocumentService @@ -92,7 +93,7 @@ email(subject="My Subject", recipients="user@example.com", attachments=['Study_A print(repr(traceback.format_exception(exc_type, exc_value, exc_traceback))) raise e - return email_model.id + return EmailModelSchema().dump(email_model) def get_email_addresses(self, users, study_id): emails = []