summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/views.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/chimere/views.py b/chimere/views.py
index cdf9b42..65a1ebd 100644
--- a/chimere/views.py
+++ b/chimere/views.py
@@ -1373,12 +1373,20 @@ class SearchView(FormView):
query, area=area, get_json=True,
check_next=True)
results += res
+ current_result = []
duplicate_res = []
for r in results:
+ key = r['properties']['key']
+ if key in current_result: # deduplicate
+ continue
+ current_result.append(key)
+
extra_icons = []
if 'extra_icons' in r['properties']:
extra_icons = r['properties']['extra_icons']
duplicate_res.append(r)
+
+ # duplicate for each category
for extra_icon in extra_icons:
data = r.copy()
data['properties'] = r['properties'].copy()