django-sql-explorer
django-sql-explorer copied to clipboard
AttributeError will be raised if User is not using email.
I am using a custom user that inherits from AbstractBaseUser and I get an AttributeError.
The reason is that the email is referenced in the created_by_user_email method of the QueryForm.
...
@property
def created_by_user_email(self):
return self.instance.created_by_user.email if \
self.instance.created_by_user else '--'
...
I think it is better not to fix it to email, because there are cases where email is not used. I will create a pull request, any other ideas or opinions? thank you