Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use uow not self.uow #1926

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading