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

requests: manage sending notifications #413

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
6 changes: 4 additions & 2 deletions invenio_requests/services/requests/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ def _execute(self, identity, request, action, uow):
action_obj.execute(identity, uow)

@unit_of_work()
def execute_action(self, identity, id_, action, data=None, uow=None, expand=False):
def execute_action(
self, identity, id_, action, data=None, uow=None, expand=False, **kwargs
):
"""Execute the given action for the request, if possible.

For instance, it would be not possible to execute the specified
Expand All @@ -244,7 +246,7 @@ def execute_action(self, identity, id_, action, data=None, uow=None, expand=Fals
raise CannotExecuteActionError(action)

# Execute action and register request for persistence.
action_obj.execute(identity, uow)
action_obj.execute(identity, uow, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is backwards compatible, but I am a bit worried so it's better to double-check.

Other actions have their signature unchanged (e.g. this action) . Can you just confirm the change is compatible?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on this one and I confirm that everything works fine 🚀

uow.register(RecordCommitOp(request, indexer=self.indexer))

# Assuming that data is just for comment payload
Expand Down
Loading