Skip to content

Commit

Permalink
Don't send email to inactive user
Browse files Browse the repository at this point in the history
  • Loading branch information
jingcheng16 committed Dec 19, 2024
1 parent 336411b commit ab2824d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion corehq/apps/settings/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def notify_about_to_expire_api_keys():
.filter(is_active=True) \
.exclude(expiration_date=None) \
.exclude(expiration_date__lt=datetime.now()) \
.exclude(expiration_date__gt=datetime.today() + timedelta(days=5))
.exclude(expiration_date__gt=datetime.today() + timedelta(days=5)) \
.filter(user__is_active=True)

url = absolute_reverse(ApiKeyView.urlname)

Expand Down

0 comments on commit ab2824d

Please sign in to comment.