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
The should_notify_upcoming_expiration function is running into a type comparison error when notifying users.
Error notifying user "USER" on upcoming expiration of request 12345: can't compare datetime.datetime to datetime.date
Traceback (most recent call last):
File "/home/keystone/.local/share/pipx/venvs/keystone-api/lib/python3.11/site-packages/keystone_api/apps/allocations/tasks/notifications.py", line 84, in notify_upcoming_expirations
if should_notify_upcoming_expiration(user, request):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/keystone/.local/share/pipx/venvs/keystone-api/lib/python3.11/site-packages/keystone_api/apps/allocations/tasks/notifications.py", line 54, in should_notify_upcoming_expiration
if user.date_joined >= date.today() - timedelta(days=next_threshold):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: can't compare datetime.datetime to datetime.date
The text was updated successfully, but these errors were encountered:
The
should_notify_upcoming_expiration
function is running into a type comparison error when notifying users.The text was updated successfully, but these errors were encountered: