This commit is contained in:
Kenneth Kehl
2023-07-10 15:38:31 -07:00
parent 3ac2feacfe
commit 015a550424
3 changed files with 10 additions and 9 deletions

View File

@@ -115,6 +115,7 @@ def update_organization(organization_id):
error = str(e.__dict__['orig'])
if "duplicate key" in error and "domain_pkey" in error:
return jsonify(result='error', message='Domain already exists'), 400
# 'organisation' here because of ix_organisation_name index in db
elif "duplicate key" in error and "organisation_name" in error:
return jsonify(result='error', message='Organization name already exists'), 400
else:

View File

@@ -124,8 +124,8 @@ use them.
- Add Agreement to models.py with the fields identified above
- Create migration to add/update table
2. Update the Organisation model:
- Add one-to-many field linking one Organisation to multiple Agreements
2. Update the Organization model:
- Add one-to-many field linking one Organization to multiple Agreements
- Add model property to convert budget amount into message limit
- Add model property to provide remaining budget based on sent messages
- Add model property about whether free tier or not

View File

@@ -70,9 +70,9 @@ components:
type: string
notes:
type: string
organisation:
organization:
type: string
organisation_type:
organization_type:
type: string
enum: ["federal", "state", "other"]
default: "federal"
@@ -121,7 +121,7 @@ components:
type: string
name:
type: string
organisations:
organizations:
type: array
items:
type: string
@@ -247,7 +247,7 @@ paths:
status:
type: string
enum: ["ok"]
/_status/live-service-and-organisation-counts:
/_status/live-service-and-organization-counts:
get:
description: 'Retrieve a count of live services and organizations in the Notify system'
tags:
@@ -262,7 +262,7 @@ paths:
properties:
services:
type: number
organisations:
organizations:
type: number
/user:
get:
@@ -302,7 +302,7 @@ paths:
properties:
data:
$ref: "#/components/schemas/userObject"
/organisations:
/organizations:
get:
security:
- bearerAuth: []
@@ -329,7 +329,7 @@ paths:
type: string
name:
type: string
organisation_type:
organization_type:
type: string
enum: ["federal", "state", "other"]
/service: