From 7178752fa823d4ef409ec0bf63333657f3114258 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Tue, 24 Oct 2023 10:09:28 +0200 Subject: [PATCH] fix: TypeError multiple values for record * functions bind to class attributes still get the self parameter which is not present in the definition of the lock_edit_published_files function. this result in `TypeError: lock_edit_published_files() got multiple values for argument 'record'`. by marking it as a static method the bind function will not get the self parameter anymore. --- invenio_drafts_resources/services/records/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/invenio_drafts_resources/services/records/config.py b/invenio_drafts_resources/services/records/config.py index 2897a08..2928efe 100644 --- a/invenio_drafts_resources/services/records/config.py +++ b/invenio_drafts_resources/services/records/config.py @@ -35,6 +35,7 @@ def is_record(record, ctx): return not record.is_draft +@staticmethod def lock_edit_published_files(service, identity, record=None): """Should published files be locked from editing in current record version.""" return True