From 23d53c24debd62f6a02c9665ff63c74ee64a7539 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Sun, 15 Dec 2024 21:11:52 +0100 Subject: [PATCH] fix: the correct handling is done in the iterator * the thinking of handling negative revision numbers in this line with the list was wrong --- invenio_records/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invenio_records/api.py b/invenio_records/api.py index c19de11e..dd5bbe3e 100644 --- a/invenio_records/api.py +++ b/invenio_records/api.py @@ -544,7 +544,7 @@ def revert(self, revision_id): if self.model is None: raise MissingModelError() - revision = list(self.revisions)[revision_id] + revision = self.revisions[revision_id] with db.session.begin_nested(): if self.send_signals: