Move function to get archived email address value

This function will be used when archiving services too, so it has been
renamed and moved to `app/utils.py`.
This commit is contained in:
Katie Smith
2020-05-22 09:36:07 +01:00
parent 6e18250fe4
commit 13f7fecd5b
2 changed files with 7 additions and 7 deletions

View File

@@ -126,3 +126,8 @@ def get_notification_table_to_use(service, notification_type, process_day, has_d
days_of_retention += 1
return Notification if days_ago <= timedelta(days=days_of_retention) else NotificationHistory
def get_archived_db_column_value(column):
date = datetime.utcnow().strftime("%Y-%m-%d")
return f'_archived_{date}_{column}'