Skip to content

Commit

Permalink
Fixed the mail alerts in send agg (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
athiruma authored Mar 20, 2024
1 parent 62e1e6d commit df6d9b1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def __update_delete_days(self, policy_es_data: list):
days = int(days)
if not days:
days = 0
alert_user = False
alert_user = True if self.__alert_dry_run else False
delete_date = 'dry_run=yes'
if not record.get('Skip'):
record['Skip'] = 'NA'
Expand All @@ -165,7 +165,7 @@ def __update_delete_days(self, policy_es_data: list):
delete_date = 'dry_run=yes'
alert_user = True
if alert_user:
if delete_date != 'skip_delete' and (delete_date != 'dry_run=yes' and self.__alert_dry_run):
if (delete_date != 'skip_delete' and delete_date != 'dry_run=yes') or self.__alert_dry_run:
record['DeleteDate'] = delete_date.__str__()
if record.get('policy') in ['empty_roles', 's3_inactive']:
record['RegionName'] = 'us-east-1'
Expand Down

0 comments on commit df6d9b1

Please sign in to comment.