Skip to content

Commit

Permalink
Fix logic and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
marrobi committed Oct 25, 2023
1 parent 8e5d967 commit 1b4afa7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion api_app/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.15.19"
__version__ = "0.15.20"
4 changes: 2 additions & 2 deletions api_app/services/schema_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ def enrich_template(original_template, extra_properties, is_update: bool = False
# this will help the UI render fields appropriately and know what it can send in a PATCH
if is_update:
for prop in template["properties"].values():
if not prop.get("updateable", True):
if not prop.get("updateable", False):
prop["readOnly"] = True

if "allOf" in template:
for conditional_property in template["allOf"]:
for condition in ["then", "else"]:
if condition in conditional_property and "properties" in conditional_property[condition]:
for prop in conditional_property[condition]["properties"].values():
if not prop.get("updateable", True):
if not prop.get("updateable", False):
prop["readOnly"] = True

# if there is an 'allOf' property which is empty, the validator fails - so remove the key
Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/base/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
schemaVersion: 1.0.0
name: tre-workspace-base
version: 1.5.1
version: 1.5.2
description: "A base Azure TRE workspace"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
4 changes: 2 additions & 2 deletions templates/workspaces/base/template_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@
"type": "string",
"title": "Application (Client) ID",
"description": "The AAD Application Registration ID for the workspace.",
"updatable": true
"updateable": true
},
"client_secret": {
"type": "string",
"title": "Application (Client) Secret",
"description": "The AAD Application Registration secret for the workspace. This value will be stored in the Workspace Key Vault.",
"sensitive": true,
"updatable": true
"updateable": true
}
},
"required": [
Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/unrestricted/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
schemaVersion: 1.0.0
name: tre-workspace-unrestricted
version: 0.11.3
version: 0.11.4
description: "A base Azure TRE workspace"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
4 changes: 2 additions & 2 deletions templates/workspaces/unrestricted/template_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@
"type": "string",
"title": "Application (Client) ID",
"description": "The AAD Application Registration ID for the workspace.",
"updatable": true
"updateable": true
},
"client_secret": {
"type": "string",
"title": "Application (Client) Secret",
"description": "The AAD Application Registration secret for the workspace. This value will be stored in the Workspace Key Vault.",
"sensitive": true,
"updatable": true
"updateable": true
}
},
"required": [
Expand Down

0 comments on commit 1b4afa7

Please sign in to comment.