summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1/state.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_api/controllers/api_v1/state.py')
-rw-r--r--indoteknik_api/controllers/api_v1/state.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/indoteknik_api/controllers/api_v1/state.py b/indoteknik_api/controllers/api_v1/state.py
index 958359a7..c03042e7 100644
--- a/indoteknik_api/controllers/api_v1/state.py
+++ b/indoteknik_api/controllers/api_v1/state.py
@@ -8,12 +8,8 @@ class District(controller.Controller):
@http.route(prefix + 'state', auth='public', methods=['GET', 'OPTIONS'])
@controller.Controller.must_authorized()
def get_state(self, **kw):
- tempo = kw.get('tempo')
- parameters = []
- if tempo == 'true':
- parameters.append(('country_id', '=', 100))
+ parameters = [('country_id', '=', 100)] # selalu ambil country_id = 100
-
name = kw.get('name')
if name:
name = '%' + name.replace(' ', '%') + '%'
@@ -22,7 +18,7 @@ class District(controller.Controller):
states = request.env['res.country.state'].search(parameters)
data = []
for state in states:
- data.append({ 'id': state.id, 'name': state.name})
-
+ data.append({'id': state.id, 'name': state.name})
+
return self.response(data)