django-easy-audit
django-easy-audit copied to clipboard
ImproperlyConfigured error raised in auth_signals.py when using multiple databases
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.
Do you have time in the short term to create a PR?
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?