mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
service_default postage resets template postage to None
This commit is contained in:
@@ -153,7 +153,9 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
@cache.delete('service-{service_id}-templates')
|
||||
@cache.delete('template-{id_}-version-None')
|
||||
@cache.delete('template-{id_}-versions')
|
||||
def update_service_template(self, id_, name, type_, content, service_id, subject=None, process_type=None, postage=None):
|
||||
def update_service_template(
|
||||
self, id_, name, type_, content, service_id, subject=None, process_type=None, postage=None
|
||||
):
|
||||
"""
|
||||
Update a service template.
|
||||
"""
|
||||
@@ -172,10 +174,14 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
data.update({
|
||||
'process_type': process_type
|
||||
})
|
||||
if postage:
|
||||
if postage in ["first", "second"]:
|
||||
data.update({
|
||||
'postage': postage
|
||||
})
|
||||
elif postage == "service_default":
|
||||
data.update({
|
||||
'postage': None
|
||||
})
|
||||
data = _attach_current_user(data)
|
||||
endpoint = "/service/{0}/template/{1}".format(service_id, id_)
|
||||
return self.post(endpoint, data)
|
||||
|
||||
Reference in New Issue
Block a user