We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Package version (if known): 3.5.0
When a record database transaction is done after login_user_via_session the user is not authenticated.
login_user_via_session
The following test failed:
def test_authenticated(app): from flask import jsonify from flask_security import current_user from invenio_records.api import Record @app.route('/authenticated') def authenticated(): return jsonify(dict(authenticated=current_user.is_authenticated)) with app.app_context(): user = create_test_user(email="[email protected]") from invenio_accounts import testutils with app.test_client() as client: testutils.login_user_via_session(client, user) Record.create({}) res = client.get(url_for("authenticated")) assert res.status_code == 200 assert get_json(res)['authenticated']
If we comment the line Record.create({}) or if we move this line before login_user_via_session is works.
Record.create({})
Note that using login_user_via_view it works in all cases.
login_user_via_view
Thanks in advance.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Package version (if known): 3.5.0
Describe the bug
When a record database transaction is done after
login_user_via_session
the user is not authenticated.Steps to Reproduce
The following test failed:
If we comment the line
Record.create({})
or if we move this line beforelogin_user_via_session
is works.Note that using
login_user_via_view
it works in all cases.Thanks in advance.
The text was updated successfully, but these errors were encountered: