fix: applications API writing to unavailable models

when $useBuildServer is set, $application->settings model does not yet exist. This change ensures the models exist before accessing them.
This commit is contained in:
SierraJC
2024-12-14 12:58:11 +11:00
parent e7ffeda8e0
commit 00c93aa8b0
3 changed files with 140 additions and 31 deletions

View File

@@ -342,8 +342,20 @@
}
},
"responses": {
"200": {
"description": "Application created successfully."
"201": {
"description": "Application created successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
"uuid": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"401": {
"$ref": "#\/components\/responses\/401"
@@ -659,8 +671,20 @@
}
},
"responses": {
"200": {
"description": "Application created successfully."
"201": {
"description": "Application created successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
"uuid": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"401": {
"$ref": "#\/components\/responses\/401"
@@ -976,8 +1000,20 @@
}
},
"responses": {
"200": {
"description": "Application created successfully."
"201": {
"description": "Application created successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
"uuid": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"401": {
"$ref": "#\/components\/responses\/401"
@@ -1222,8 +1258,20 @@
}
},
"responses": {
"200": {
"description": "Application created successfully."
"201": {
"description": "Application created successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
"uuid": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"401": {
"$ref": "#\/components\/responses\/401"
@@ -1451,8 +1499,20 @@
}
},
"responses": {
"200": {
"description": "Application created successfully."
"201": {
"description": "Application created successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
"uuid": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"401": {
"$ref": "#\/components\/responses\/401"
@@ -1533,8 +1593,20 @@
}
},
"responses": {
"200": {
"description": "Application created successfully."
"201": {
"description": "Application created successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
"uuid": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"401": {
"$ref": "#\/components\/responses\/401"