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: TypeError multiple values for record #270

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

utnapischtim
Copy link
Contributor

@utnapischtim utnapischtim commented Oct 24, 2023

  • functions bind to class attributes still get the self parameter which
    is not present in the definition of the lock_edit_published_files
    function. this result in TypeError: lock_edit_published_files() got multiple values for argument 'record'. by marking it as a static
    method the bind function will not get the self parameter anymore.

the full error is:

env/lib/python3.11/site-packages/invenio_drafts_resources/services/records/components/base.py", line 168, in edit
    lock_files = self.service.config.lock_edit_published_files(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: lock_edit_published_files() got multiple values for argument 'record'

* functions bind to class attributes still get the self parameter which
  is not present in the definition of the lock_edit_published_files
  function. this result in `TypeError: lock_edit_published_files() got
  multiple values for argument 'record'`. by marking it as a static
  method the bind function will not get the self parameter anymore.
@kpsherva kpsherva self-assigned this Oct 25, 2023
@kpsherva kpsherva merged commit 520c951 into inveniosoftware:master Oct 26, 2023
4 checks passed
@utnapischtim utnapischtim deleted the fix-type-error branch October 26, 2023 18:29
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.

2 participants