mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
add organisation and branding models
a service now has branding and organisation_id columns, and two new
tables have been aded to reflect these:
* branding is a static types table referring to how a service wants
their emails to be branded:
* 'govuk' for GOV UK branding (default)
* 'org' for organisational branding only
* 'both' for co-branded output with both
* organisation is a table defining an organisation's branding. this
contains three entries, all of which are nullable
* colour - a hex code for a coloured bar on the logo's left
* logo - relative path for that org's logo image
* name - the name to display on the right of the logo
This commit is contained in:
@@ -114,12 +114,13 @@ class ServiceSchema(BaseSchema):
|
||||
'old_id',
|
||||
'template_statistics',
|
||||
'service_provider_stats',
|
||||
'service_notification_stats')
|
||||
'service_notification_stats',
|
||||
'organisation')
|
||||
strict = True
|
||||
|
||||
@validates('sms_sender')
|
||||
def validate_sms_sender(self, value):
|
||||
if value and not re.match('^[a-zA-Z0-9\s]+$', value):
|
||||
if value and not re.match(r'^[a-zA-Z0-9\s]+$', value):
|
||||
raise ValidationError('Only alphanumeric characters allowed')
|
||||
|
||||
|
||||
@@ -136,7 +137,8 @@ class DetailedServiceSchema(BaseSchema):
|
||||
'jobs',
|
||||
'template_statistics',
|
||||
'service_provider_stats',
|
||||
'service_notification_stats'
|
||||
'service_notification_stats',
|
||||
'organisation'
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user