Skip to content

Commit

Permalink
Simplify bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Apr 18, 2024
1 parent 069708e commit a7f9824
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,14 @@ def simple_cards():
if situations:
filters['situation_ids']= situations
if bounds:
filters['branch_geometry__bounded'] = json.loads(bounds)
bounds = bounds.split(',')
bounds = [float(x) for x in bounds]
filters['branch_geometry__bounded'] = [
[
[bounds[0], bounds[3]],
[bounds[2], bounds[1]],
]
]
filters = json.dumps([filters])

es_client = current_app.config['ES_CLIENT']
Expand Down

0 comments on commit a7f9824

Please sign in to comment.