Skip to content

Commit

Permalink
Merge pull request #35549 from dimagi/jc/stop-sending-email-to-inacti…
Browse files Browse the repository at this point in the history
…ve-user

Don't send email to inactive user
  • Loading branch information
jingcheng16 authored Dec 24, 2024
2 parents 349a0d3 + ab2824d commit d7388d0
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 d7388d0

Please sign in to comment.