Add extra fields to create/update organisation

This commit is contained in:
Chris Hill-Scott
2019-07-03 14:53:20 +01:00
parent 1ebd147ad0
commit a4ae534f87
3 changed files with 57 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
from app.models import INVITED_USER_STATUS_TYPES
from app.models import INVITED_USER_STATUS_TYPES, ORGANISATION_TYPES
from app.schema_validation.definitions import uuid
post_create_organisation_schema = {
@@ -7,9 +7,11 @@ post_create_organisation_schema = {
"type": "object",
"properties": {
"name": {"type": "string"},
"active": {"type": ["boolean", "null"]}
"active": {"type": ["boolean", "null"]},
"crown": {"type": "boolean"},
"organisation_type": {"enum": ORGANISATION_TYPES},
},
"required": ["name"]
"required": ["name", "crown", "organisation_type"]
}
post_update_organisation_schema = {
@@ -18,7 +20,9 @@ post_update_organisation_schema = {
"type": "object",
"properties": {
"name": {"type": ["string", "null"]},
"active": {"type": ["boolean", "null"]}
"active": {"type": ["boolean", "null"]},
"crown": {"type": ["boolean", "null"]},
"organisation_type": {"enum": ORGANISATION_TYPES},
},
"required": []
}