Schema for returning email model

This commit is contained in:
mike cullerton 2021-10-13 11:42:01 -04:00
parent e72cf27fe3
commit dcb06f3753
1 changed files with 3 additions and 4 deletions

View File

@ -23,9 +23,8 @@ class EmailModel(db.Model):
class EmailModelSchema(ma.Schema):
# TODO: clean this us. Do we need load_instance and unknown?
class Meta:
model = EmailModel
load_instance = True
additional = ["id", "subject", "sender", "recipients", "timestamp"]
unknown = INCLUDE
fields = ["id", "subject", "sender", "recipients", "cc", "bcc", "content", "content_html",
"study_id", "timestamp", "workflow_spec_id"]