mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-17 03:40:29 -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):
|
||||
return {
|
||||
'id': str(self.id),
|
||||
'service_id': str(self.service_id),
|
||||
'contact_block': self.contact_block,
|
||||
'is_default': self.is_default,
|
||||
'created_at': self.created_at.strftime(DATETIME_FORMAT),
|
||||
|
||||
@@ -209,6 +209,7 @@ class ServiceSchema(BaseSchema):
|
||||
'service_sms_senders',
|
||||
'monthly_billing',
|
||||
'reply_to_email_addresses',
|
||||
'letter_contacts',
|
||||
)
|
||||
strict = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user