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.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_api/controllers/controller.py b/indoteknik_api/controllers/controller.py
index a08d9fa4..18f54d71 100644
--- a/indoteknik_api/controllers/controller.py
+++ b/indoteknik_api/controllers/controller.py
@@ -68,19 +68,19 @@ class Controller(http.Controller):
elif rule == 'number' and value and not value.isdigit():
result['reason'].append(key + ' must be ' + rule)
+ result['query'][key] = value
if not value and default:
value = default
if is_number and value.isdigit():
value = int(value)
- if not value:
+ if not value and not default:
value = None
result['value'][alias] = value
- result['query'][key] = value
if len(result['reason']) > 0:
result['valid'] = False
- if not result['valid']:
- del result['value']
+ # if not result['valid']:
+ # del result['value']
return result
def time_to_str(self, object, format):