Farid Karimli commited on
Commit
4255fe8
·
1 Parent(s): d6bff98
Files changed (1) hide show
  1. apps/ai_tutor/helpers.py +3 -1
apps/ai_tutor/helpers.py CHANGED
@@ -23,7 +23,9 @@ async def check_user_cooldown(
23
  last_message_time = datetime.fromisoformat(last_message_time_str).replace(
24
  tzinfo=timezone.utc
25
  )
26
- except Exception as e: # this probably means the user has never sent a message before
 
 
27
  return False, None
28
 
29
  current_time = datetime.fromisoformat(current_time).replace(tzinfo=timezone.utc)
 
23
  last_message_time = datetime.fromisoformat(last_message_time_str).replace(
24
  tzinfo=timezone.utc
25
  )
26
+ except (
27
+ Exception
28
+ ) as e: # this probably means the user has never sent a message before
29
  return False, None
30
 
31
  current_time = datetime.fromisoformat(current_time).replace(tzinfo=timezone.utc)