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 update_record_files_async signature #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZedThree
Copy link

@ZedThree ZedThree commented Jun 22, 2022

❤️ Thank you for your contribution!

Description

Trying to upload files via the REST API gives the following (abridged) error:

...
  File "example/venv/lib64/python3.10/site-packages/invenio_files_rest/views.py", line 625, in create_object
    file_uploaded.send(current_app._get_current_object(), obj=obj)
  File "example/venv/lib64/python3.10/site-packages/blinker/base.py", line 266, in send
    return [(receiver, receiver(sender, **kwargs))
  File "example/venv/lib64/python3.10/site-packages/blinker/base.py", line 266, in <listcomp>
    return [(receiver, receiver(sender, **kwargs))
TypeError: update_record_files_async() got an unexpected keyword argument 'obj'

From this, I gather that update_records_files_async requires two arguments, one of which is called obj. It currently takes one argument which is named object_version. With this change it seems to work at least. I'm not sure how to test it automatically though

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Third-party code

If you've added third-party code (copy/pasted or new dependencies), please reach out to an architect.

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant