-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Incorrectly documented SQLALCHEMY_CUSTOM_PASSWORD_STORE #4043
Comments
@fabianmenges I think you contributed this originally. The function should probably be stamped in module scope instead of as a class attribute. |
Hm, interesting, we are using this slightly different, which is why I didn't run into it... e.g.:
Not sure how this wasn't caught in the unit test. Anyways, two options. Either change the documentation or move the 'function' @ottomata are you using the |
Oh, I just realized this is probably because this field is on a SQLAlchemy model and we probably have some weird interaction here. I should probably move this function out of the Database class. |
Yeah, I’m not using `self` at all. I only put it in there to make it work.
I think a custom function shouldn’t need reference to a class instance, but
should be standalone. +1 to moving it out of the Database class. :)
…On Thu, Dec 14, 2017 at 10:16 AM, fabianmenges ***@***.***> wrote:
Oh, I just realized this is probably because this field is on a SQLAlchemy
model and we probably have some weird interaction here. I should probably
move this function out of the Database class.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4043 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABjPxkJrBHGElykFSZBUVfRyKlFXdR8qks5tATvHgaJpZM4Q9_xh>
.
|
apache/superset#4043 has been fixed Bug: T201430 Change-Id: I83f9d96681484c4f07eebbc94ce4c3bbe4291bd9
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
The docs say to do:
But, superset sets this function as a instance variable on the Database model class, and calls it as such, with
self
:When called with self, it is expected that the function take a
self
argument as the first parameter.I fixed this temporarily in my function by adding a dummy 'self', but probably the code should not need this. :)
The text was updated successfully, but these errors were encountered: