-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
SQLAlchemy Error about implicitly combining uid columns #1
Comments
Ah, I've found the issue. When running with social.py
models.py
Run with I have, for now, worked around this by returning a singleton from my app factory, but this is a bit janky. If there was some way this could be fixed in social-auth itself, that would be easier for me or anyone else who uses factories like I do (which makes testing a lot nicer). |
Specifically, this footgun is the result of init_social() always importing the module your USER_MODEL is in, even if (as I've just discovered) your app is trivial enough that you put your model(s) in the same module as the app itself... In @dcrosta's example, I think all that was needed was an |
I'm trying to set up PSA with Flask & SQLAlchemy. I've gotten as far as calling
init_social
, but as soon as I try to access my app (runflask shell
or load a page inflask run
, etc), I get this error:I'm using:
As near as I can tell, there's only one actual definition of
uid
, which is at https://github.com/python-social-auth/social-app-flask-sqlalchemy/blob/master/social_flask_sqlalchemy/models.py#L80 -- everywhere else in the class hierarchy,uid
is assigned toNone
. But I'm hoping that there's something obvious I've missed here, or something you've run into before that can help.Thanks!
The text was updated successfully, but these errors were encountered: