From f379022c0667b5583c4c99e9641c6dc2538894de Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Mon, 13 Jan 2025 16:21:46 +0100 Subject: [PATCH] fix: use uow not self.uow --- invenio_rdm_records/services/communities/moderation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invenio_rdm_records/services/communities/moderation.py b/invenio_rdm_records/services/communities/moderation.py index 52e7e4342..f7d8a81ee 100644 --- a/invenio_rdm_records/services/communities/moderation.py +++ b/invenio_rdm_records/services/communities/moderation.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2024 CERN. +# Copyright (C) 2025 Graz University of Technology. # # Invenio-RDM-Records is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. @@ -50,7 +51,7 @@ def run(self, identity, record=None, uow=None): is_verified = identity.user.verified_at is not None if not is_verified: # Spawn a task to request moderation. - self.uow.register(TaskOp(request_moderation, user_id=identity.id)) + uow.register(TaskOp(request_moderation, user_id=identity.id)) def create(self, identity, record=None, data=None, uow=None, **kwargs): """Handle create."""