mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
Archive, don’t delete contact lists
So we keep a record of who first uploaded a list it’s better to archive a list than completely delete it. The list in the database doesn’t contain any recipient info so this isn’t a change to what data we’re retaining. This means updating the endpoints that get contact lists to exclude ones that are archived.
This commit is contained in:
@@ -976,7 +976,8 @@ def create_service_contact_list(
|
||||
original_file_name='EmergencyContactList.xls',
|
||||
row_count=100,
|
||||
template_type='email',
|
||||
created_by_id=None
|
||||
created_by_id=None,
|
||||
archived=False,
|
||||
):
|
||||
if not service:
|
||||
service = create_service(service_name='service for contact list', user=create_user())
|
||||
@@ -988,6 +989,7 @@ def create_service_contact_list(
|
||||
template_type=template_type,
|
||||
created_by_id=created_by_id or service.users[0].id,
|
||||
created_at=datetime.utcnow(),
|
||||
archived=archived,
|
||||
)
|
||||
db.session.add(contact_list)
|
||||
db.session.commit()
|
||||
|
||||
Reference in New Issue
Block a user