From fe9c2c1c2d985392237c932a815576dd5d0ac6d3 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 30 Nov 2022 15:19:59 +0100 Subject: [PATCH] fix bug privacity --- ereuse_devicehub/inventory/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index fe1c37e7..a9b44d50 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -152,8 +152,10 @@ class ErasureListView(DeviceListMixin): where action.parent_id is null or placeholder.kangaroo=true """ ids = (e[0] for e in db.session.execute(sql)) - erasure = EraseBasic.query.filter(EraseBasic.id.in_(ids)).order_by( - EraseBasic.created.desc() + erasure = ( + EraseBasic.query.filter(EraseBasic.id.in_(ids)) + .filter_by(author=g.user) + .order_by(EraseBasic.created.desc()) ) self.context['orphans'] = True