Skip to content
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

Error when expiry is null #151

Closed
haflidi opened this issue Jan 24, 2023 · 1 comment
Closed

Error when expiry is null #151

haflidi opened this issue Jan 24, 2023 · 1 comment

Comments

@haflidi
Copy link

haflidi commented Jan 24, 2023

Using SQLALCHEMY with postgresql. One client written in angular deleted the session cookie when logout. When this happended a new entry in the session table had an expiry with null value. This caused an error in line 535 in the sessions.py file. It's very easy to fix this error. I changed the if statement in line 535 to:
if saved_session and (saved_session.expiry is None or saved_session.expiry <= datetime.utcnow()):
It would be very nice If you could correct this error in next release of flask-session

@Lxstr
Copy link
Contributor

Lxstr commented Feb 2, 2024

Should now be fixed thanks

@Lxstr Lxstr closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants