From 46473436d995a62877f73a18c2c27301cf44a4df Mon Sep 17 00:00:00 2001 From: Anika Churilova Date: Fri, 19 Jul 2024 16:57:10 +0200 Subject: [PATCH] services: clean up the code * closes https://github.com/inveniosoftware/invenio-app-rdm/issues/2685 --- invenio_records_resources/services/records/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invenio_records_resources/services/records/service.py b/invenio_records_resources/services/records/service.py index 1d816b51..4f61aa13 100644 --- a/invenio_records_resources/services/records/service.py +++ b/invenio_records_resources/services/records/service.py @@ -380,7 +380,7 @@ def read(self, identity, id_, expand=False, action="read"): record = self.record_cls.pid.resolve(id_) try: self.require_permission(identity, action, record=record) - except PermissionDeniedError as e: + except PermissionDeniedError: raise RecordPermissionDeniedError(action_name=action, record=record) # Run components for component in self.components: