You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
comparing any user instance to iteself will return false, which is breaking other extensions like sqlalchemy wtfroms which cannot validate that a user is equal to the user choices.
example code that breaks
a=User.query.first()
ifa==a:
print("everything is good, they are equal")
else:
print("under no circumstances should python objects not be equal to themselves")
result: "under no circumstances should python objects not be equal to themselves"
apparently the __eq__ override is broken, since it does not use the primary key.
this is in my opinion a issue that will force me to not use flask-user in the future
The text was updated successfully, but these errors were encountered:
flask user is not really maintained since the start of 2020. If you have an application that uses flask_user and you can't replace flask user with flask login I would recommend you to use a custom UserManager with a custom User class.
Though for the user object specifically a simple workaround like a function that compares the attributes should be enough.
comparing any user instance to iteself will return false, which is breaking other extensions like sqlalchemy wtfroms which cannot validate that a user is equal to the user choices.
example code that breaks
result: "under no circumstances should python objects not be equal to themselves"
apparently the
__eq__
override is broken, since it does not use the primary key.this is in my opinion a issue that will force me to not use flask-user in the future
The text was updated successfully, but these errors were encountered: