Sort allowed attributes alphabetically

This commit is contained in:
Pea Tyczynska
2021-02-01 17:36:04 +00:00
parent f107fe260a
commit 33dbfbaa65

View File

@@ -79,32 +79,32 @@ class ServiceAPIClient(NotifyAdminAPIClient):
"""
data = _attach_current_user(kwargs)
disallowed_attributes = set(data.keys()) - {
'name',
'message_limit',
'active',
'restricted',
'consent_to_research',
'contact_link',
'count_as_live',
'created_by',
'email_branding',
'email_from',
'free_sms_fragment_limit',
'go_live_at',
'go_live_user',
'letter_branding',
'letter_contact_block',
'message_limit',
'name',
'notes',
'organisation_type',
'permissions',
'prefix_sms',
'rate_limit',
'reply_to_email_address',
'research_mode',
'restricted',
'sms_sender',
'created_by',
'letter_branding',
'email_branding',
'letter_contact_block',
'permissions',
'organisation_type',
'free_sms_fragment_limit',
'prefix_sms',
'contact_link',
'volume_email',
'volume_sms',
'volume_letter',
'consent_to_research',
'count_as_live',
'go_live_user',
'go_live_at',
'rate_limit',
'notes'
'volume_sms',
}
if disallowed_attributes:
raise TypeError('Not allowed to update service attributes: {}'.format(