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').