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

ImproperlyConfigured error raised in auth_signals.py when using multiple databases #229

Open
LukaRiba opened this issue May 23, 2022 · 2 comments

Comments

@LukaRiba
Copy link
Contributor

In user_logged_in, user_logged_out and user_login_failed receiver functions (signals/auth_signals.py), argument 'using' is not passed to transaction.atomic(), so execption is raised when multiple databases are used. When I changed with transaction.atomic(): line to with transaction.atomic(using=DATABASE_ALIAS):, all logging events have been successfully written into database.
I suppose this is the issue as in signals/model_signals.py, DATABASE_ALIAS is passed as 'using' argument to transaction.atomic() calls.

@jheld
Copy link
Collaborator

jheld commented May 24, 2022

Do you have time in the short term to create a PR?

LukaRiba added a commit to LukaRiba/django-easy-audit that referenced this issue May 25, 2022
…ignals.py when using multiple databases)
@mschoettle
Copy link
Contributor

I have two databases set up (one called “default”) and this issue does not occur there. Is this in the case where there is no default database?

jheld pushed a commit that referenced this issue Sep 4, 2022
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

No branches or pull requests

3 participants