Skip to content

Commit 745817e

Browse files
author
Joakim Nohlgård
committed
servicedirectory: Obey filter criteria when listing services
1 parent 8fe1773 commit 745817e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arrowhead/servicedirectory/directory.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ def service_list(self, **search):
198198
self.log.debug('list %r', search)
199199
now = unix_now()
200200
# Find all services with deadline >= now
201-
services = self._db.filter(self.Service, {'deadline': {'$gte': now}})
201+
criteria = {key: value for key, value in search.items()}
202+
criteria['deadline'] = {'$gte': now}
203+
services = self._db.filter(self.Service, criteria)
202204
res = [dict(service.attributes.copy()) for service in services]
203205
return res
204206

0 commit comments

Comments
 (0)