mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-04 13:41:38 -04:00
Refactor to avoid redefinition of org types
We’re defining the list of org types in a few different places. This makes it more likely we’ll forget to update one of these places, thereby introducing a bug. This commit moves the definition to be on the organisation model, which feels like a sensible enough place for it.
This commit is contained in:
@@ -7,6 +7,17 @@ from app.notify_client.organisations_api_client import organisations_client
|
||||
|
||||
class Organisation(JSONModel):
|
||||
|
||||
TYPES = (
|
||||
('central', 'Central government'),
|
||||
('local', 'Local government'),
|
||||
('nhs_central', 'NHS – central government agency or public body'),
|
||||
('nhs_local', 'NHS Trust or Clinical Commissioning Group'),
|
||||
('nhs_local', 'GP practice'),
|
||||
('emergency_service', 'Emergency service'),
|
||||
('school_or_college', 'School or college'),
|
||||
('other', 'Other'),
|
||||
)
|
||||
|
||||
ALLOWED_PROPERTIES = {
|
||||
'id',
|
||||
'name',
|
||||
|
||||
Reference in New Issue
Block a user