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:
Ken Tsang
2017-09-21 16:38:24 +01:00
parent 366d07dbbe
commit 91a618531d
2 changed files with 3 additions and 0 deletions

View File

@@ -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),

View File

@@ -209,6 +209,7 @@ class ServiceSchema(BaseSchema):
'service_sms_senders',
'monthly_billing',
'reply_to_email_addresses',
'letter_contacts',
)
strict = True