Skip to content

Commit f0429cb

Browse files
committed
client params query
1 parent 1896154 commit f0429cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: functions/technologies/libs/queries.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from .utils import convert_to_array
88
from .presenters import Presenters
99

10-
1110
DB = firestore.Client(project=os.environ.get('PROJECT'), database=os.environ.get('DATABASE'))
1211

1312
def list_data(params):
@@ -30,6 +29,9 @@ def list_data(params):
3029
params_array = convert_to_array(params['category'])
3130
query = query.where(filter=FieldFilter('category_obj', 'array_contains_any', params_array))
3231

32+
if 'client' in params:
33+
query = query.where(filter=FieldFilter('client', '==', params['client']))
34+
3335
if 'onlyname' in params:
3436
onlyname = True
3537

0 commit comments

Comments
 (0)