From 306bad966b4ff7d111162d1717d00d95d71f3098 Mon Sep 17 00:00:00 2001 From: nad Date: Tue, 18 Aug 2020 21:02:54 +0200 Subject: [PATCH] Adding lot permissions to LotsDocumentView --- ereuse_devicehub/resources/documents/documents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/documents/documents.py b/ereuse_devicehub/resources/documents/documents.py index bb432019..53bd8d82 100644 --- a/ereuse_devicehub/resources/documents/documents.py +++ b/ereuse_devicehub/resources/documents/documents.py @@ -133,7 +133,7 @@ class DevicesDocumentView(DeviceView): class LotsDocumentView(LotView): def find(self, args: dict): - query = self.query(args) + query = (x for x in self.query(args) if x.owner_id == g.user.id) return self.generate_lots_csv(query) def generate_lots_csv(self, query):