diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-21 08:21:31 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-21 08:21:31 +0700 |
| commit | 33a366ae44bc045439087170ed69b86033cda2d8 (patch) | |
| tree | ec2414c7bcbdb0548efc251a0fc792d4f93d66ab /indoteknik_api/controllers/controller.py | |
| parent | ac80b37ffeaefc9efeec732c167ba272bc1a984b (diff) | |
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): |
