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

config: ensuring that the setting of ACCOUNTS_REGISTER_BLUEPRINT=Fals… #469

Merged
merged 5 commits into from
Dec 21, 2023

Conversation

psaiz
Copy link
Contributor

@psaiz psaiz commented Dec 20, 2023

…e works

❤️ Thank you for your contribution!

Description

Setting the parameter of ACCOUNTS_REGISTER_BLUEPRINT=False on opendata gave the following error:

172.19.0.1 - - [20/Dec/2023 09:02:07] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/flask/app.py", line 2552, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/werkzeug/middleware/dispatcher.py", line 78, in __call__
    return app(environ, start_response)
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/flask/app.py", line 2532, in wsgi_app
    response = self.handle_exception(e)
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/flask/app.py", line 1815, in full_dispatch_request
    self.ensure_sync(func)()
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/invenio_accounts/views/settings.py", line 83, in init_menu
    current_app.view_functions[view_name]
KeyError: 'security.change_password'

It looks like the initialization is sill requiring some settings that should not be needed.
This patch addresses that issue.

@psaiz psaiz requested a review from zzacharo December 20, 2023 16:48
@psaiz psaiz marked this pull request as draft December 20, 2023 16:48
@psaiz
Copy link
Contributor Author

psaiz commented Dec 20, 2023

I've marked it as draft, since I can't get the new test to work correctly. Feedback on that will be appreciated

tests/test_invenio_accounts.py Outdated Show resolved Hide resolved
tests/test_invenio_accounts.py Show resolved Hide resolved
* Test that `ACCOUNTS_REGISTER_BLUEPRINT` is not registering the
  account settings menu
@psaiz
Copy link
Contributor Author

psaiz commented Dec 21, 2023

Thanks for fixing the tests, Zach! Feel free to merge it at your best convenience

@zzacharo zzacharo merged commit 84639b8 into inveniosoftware:master Dec 21, 2023
6 checks passed
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