diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-01-21 01:22:57 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-01-21 01:22:57 +0000 |
| commit | c6032a407758afa650a0e3e25d51606cf91c75b8 (patch) | |
| tree | 3428a7214e489515039d4cb3f08380c9e9639ea0 /indoteknik_api/controllers/controller.py | |
| parent | b33103dea998552d110d029d7f50ed08f58ce192 (diff) | |
| parent | 33a366ae44bc045439087170ed69b86033cda2d8 (diff) | |
Merged in feature/rest-api (pull request #25)
api sale order and user
Diffstat (limited to 'indoteknik_api/controllers/controller.py')
| -rw-r--r-- | indoteknik_api/controllers/controller.py | 8 |
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): |
