Return email model from email script.

This commit is contained in:
mike cullerton 2021-10-13 11:41:44 -04:00
parent c5d8e20e74
commit e72cf27fe3
1 changed files with 2 additions and 1 deletions

View File

@ -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 = []