add organisation and branding to GET /service response dict

This commit is contained in:
Leo Hemsted
2016-08-12 11:40:57 +01:00
parent 8a3a4f7759
commit cc7ea8043c
2 changed files with 5 additions and 2 deletions

View File

@@ -103,6 +103,8 @@ class ProviderDetailsSchema(BaseSchema):
class ServiceSchema(BaseSchema):
created_by = field_for(models.Service, 'created_by', required=True)
organisation = field_for(models.Service, 'organisation_id', dump_only=True)
branding = field_for(models.Service, 'branding')
class Meta:
model = models.Service
@@ -114,8 +116,7 @@ class ServiceSchema(BaseSchema):
'old_id',
'template_statistics',
'service_provider_stats',
'service_notification_stats',
'organisation')
'service_notification_stats')
strict = True
@validates('sms_sender')