mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Fix incorrect redis key deleting
We were trying to delete the old 'template-{template-id}' keys but
should have been deleting the new keys which have the service id as part
of the key name. This was causing the cache to not be correctly purged
when we did things like update sender names or set defaults. This should
fix it.
This commit is contained in:
@@ -10,7 +10,7 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
templates_for_service = self.get_service_templates(service_id)['data']
|
||||
if templates_for_service:
|
||||
redis_client.delete(*[
|
||||
f"template-{x['id']}-version-None"
|
||||
f"service-{service_id}-template-{x['id']}-version-None"
|
||||
for x in templates_for_service
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user