Skip to content

Commit

Permalink
fix: use uow not self.uow
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim authored and slint committed Jan 14, 2025
1 parent 87ee1ac commit 3f81209
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion invenio_rdm_records/services/communities/moderation.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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."""
Expand Down

0 comments on commit 3f81209

Please sign in to comment.