We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13f78c5 commit 7cf53d9Copy full SHA for 7cf53d9
functions/technologies/libs/queries.py
@@ -44,18 +44,17 @@ def list_data(params):
44
45
documents = query.stream()
46
47
- if onlyname:
48
- data = set()
49
- for doc in documents:
50
- item = doc.to_dict()
51
- data.add(item['technology'])
52
-
53
- data = list(data)
54
- data.sort()
55
56
- else:
57
- data = []
58
59
- data.append(Presenters.technology(doc.to_dict()))
+ data = []
+ seen = set()
+ for doc in documents:
+ item = doc.to_dict()
+
+ if onlyname:
+ technology = item['technology']
+ if technology not in seen:
+ seen.add(technology)
+ data.append(technology)
+ else:
+ data.append(Presenters.technology(item))
60
61
return Result(result=data)
0 commit comments