mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 17:19:49 -04:00
Update serialization and service schema
- added id and service_id in serialization - added 'letter_contacts' to the exluded list for marshmallow service schema
This commit is contained in:
@@ -1406,6 +1406,8 @@ class ServiceLetterContact(db.Model):
|
|||||||
|
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
return {
|
return {
|
||||||
|
'id': str(self.id),
|
||||||
|
'service_id': str(self.service_id),
|
||||||
'contact_block': self.contact_block,
|
'contact_block': self.contact_block,
|
||||||
'is_default': self.is_default,
|
'is_default': self.is_default,
|
||||||
'created_at': self.created_at.strftime(DATETIME_FORMAT),
|
'created_at': self.created_at.strftime(DATETIME_FORMAT),
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ class ServiceSchema(BaseSchema):
|
|||||||
'service_sms_senders',
|
'service_sms_senders',
|
||||||
'monthly_billing',
|
'monthly_billing',
|
||||||
'reply_to_email_addresses',
|
'reply_to_email_addresses',
|
||||||
|
'letter_contacts',
|
||||||
)
|
)
|
||||||
strict = True
|
strict = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user