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

'NoneType' object is not subscriptable #1

Closed
salvadorpla opened this issue Dec 1, 2019 · 1 comment
Closed

'NoneType' object is not subscriptable #1

salvadorpla opened this issue Dec 1, 2019 · 1 comment
Labels
bug

Comments

@salvadorpla
Copy link
Owner

@salvadorpla salvadorpla commented Dec 1, 2019

mailing.py scheduled run throws:

'NoneType' object is not subscriptable
'<' not supported between instances of 'datetime.datetime' and 'NoneType'

@salvadorpla

This comment has been minimized.

Copy link
Owner Author

@salvadorpla salvadorpla commented Dec 1, 2019

Found the error. When an inactive user deletes itself its account, following query returns 'None':

cur.execute("select last_sign_in_at from users where account_id=(%s)", (id,))
row = cur.fetchone()

row is None because the user does not exist in the database.

@salvadorpla salvadorpla added the bug label Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.