diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-17 14:21:27 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-17 14:21:27 +0700 |
| commit | 3e7913ef03dc46a902f14d29e00c92eaed6bdf9d (patch) | |
| tree | 19f67744179b5bc46ccd3887661914dc0bea4b7e /indoteknik_api/controllers/controller.py | |
| parent | 5e9f405cf05b3ae56564c8febff1d43decf63c62 (diff) | |
Fix error edit address, delete delivery line sale order api
Diffstat (limited to 'indoteknik_api/controllers/controller.py')
| -rw-r--r-- | indoteknik_api/controllers/controller.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_api/controllers/controller.py b/indoteknik_api/controllers/controller.py index b850bdde..90bc50ed 100644 --- a/indoteknik_api/controllers/controller.py +++ b/indoteknik_api/controllers/controller.py @@ -73,6 +73,7 @@ class Controller(http.Controller): for key, rules in queries.items(): is_number = 'number' in rules + is_exclude_if_null = 'exclude_if_null' in rules 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) @@ -91,6 +92,9 @@ class Controller(http.Controller): if is_number and value.isdigit(): value = int(value) + if not value and is_exclude_if_null: + continue + result['value'][alias] = value result['valid'] = not result['reason'] |
