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

Multidb raises exception if SLAVE_DATABASES is not defined in settings #39

Closed
seocam opened this issue May 3, 2018 · 0 comments
Closed
Milestone

Comments

@seocam
Copy link

seocam commented May 3, 2018

There is a fallback implementation that's actually never called because it's missing the default param of getattr function. Here is what I'm talking about:

if getattr(settings, 'SLAVE_DATABASES'):

Instead of getattr(settings, 'SLAVE_DATABASES') if should be getattr(settings, 'SLAVE_DATABASES', None).

Another option that might be even better would be hasattr(settings, 'SLAVE_DATABASES').

@seocam seocam changed the title Multdb raises exception if SLAVE_DATABASES is not defined in settings Multidb raises exception if SLAVE_DATABASES is not defined in settings May 3, 2018
@jsocol jsocol added this to the 0.9 milestone Jan 21, 2019
@jsocol jsocol closed this as completed in c95e065 Jan 21, 2019
@jsocol jsocol mentioned this issue Jan 21, 2019
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 a pull request may close this issue.

2 participants