@@ -12,22 +12,21 @@ def list_data(params):
12
12
technology_array = convert_to_array (params ['technology' ])
13
13
data = []
14
14
15
- query = DB .collection (TABLE )
15
+ for technology in technology_array :
16
+ query = DB .collection (TABLE )
16
17
17
- if 'start' in params :
18
- query = query .where (filter = FieldFilter ('date' , '>=' , params ['start' ]))
19
- if 'end' in params :
20
- query = query .where (filter = FieldFilter ('date' , '<=' , params ['end' ]))
18
+ if 'start' in params :
19
+ query = query .where (filter = FieldFilter ('date' , '>=' , params ['start' ]))
20
+ if 'end' in params :
21
+ query = query .where (filter = FieldFilter ('date' , '<=' , params ['end' ]))
21
22
22
- query = query .where (filter = FieldFilter ('geo' , '==' , params ['geo' ]))
23
- query = query .where (filter = FieldFilter ('rank' , '==' , params ['rank' ]))
24
-
25
- for technology in technology_array :
23
+ query = query .where (filter = FieldFilter ('geo' , '==' , params ['geo' ]))
24
+ query = query .where (filter = FieldFilter ('rank' , '==' , params ['rank' ]))
26
25
query = query .where (filter = FieldFilter ('technology' , '==' , technology ))
27
26
28
- documents = query .stream ()
27
+ documents = query .stream ()
29
28
30
- for doc in documents :
31
- data .append (doc .to_dict ())
29
+ for doc in documents :
30
+ data .append (doc .to_dict ())
32
31
33
- return Result (result = data )
32
+ return Result (result = data )
0 commit comments