summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_api/controllers/controller.py')
-rw-r--r--indoteknik_api/controllers/controller.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/controller.py b/indoteknik_api/controllers/controller.py
index 5b20f7d4..d4afb672 100644
--- a/indoteknik_api/controllers/controller.py
+++ b/indoteknik_api/controllers/controller.py
@@ -76,7 +76,8 @@ class Controller(http.Controller):
alias = next((r.replace('alias:', '') for r in rules if r.startswith('alias:')), key)
default = next((r.replace('default:', '') for r in rules if r.startswith('default:')), None)
- if (value := kw.get(key, '')) in ['null', 'undefined']:
+ value = kw.get(key, '')
+ if value in ['null', 'undefined']:
value = ''
if 'required' in rules and not value:
result['reason'].append(f"{key} is required")