fixing bug us2524

This commit is contained in:
Cayo Puigdefabregas 2021-12-16 13:21:35 +01:00
parent 4af5e44d21
commit a670a01c5e
1 changed files with 3 additions and 0 deletions

View File

@ -120,6 +120,9 @@ class DevicesDocumentView(DeviceView):
@cache(datetime.timedelta(minutes=1))
def find(self, args: dict):
query = self.query(args)
filters = json.loads(request.args.get('filter', {}))
ids = filters.get('ids', [])
query = self.query(args).filter(Device.id.in_(ids))
return self.generate_post_csv(query)
def generate_post_csv(self, query):