mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Merged in the defensive code by mistake
This commit is contained in:
@@ -17,16 +17,11 @@ class TemplateStatisticsApiClient(BaseAPIClient):
|
|||||||
if limit_days is not None:
|
if limit_days is not None:
|
||||||
params['limit_days'] = limit_days
|
params['limit_days'] = limit_days
|
||||||
|
|
||||||
response = self.get(
|
return self.get(
|
||||||
url='/service/{}/template-statistics'.format(service_id),
|
url='/service/{}/template-statistics'.format(service_id),
|
||||||
params=params
|
params=params
|
||||||
)['data']
|
)['data']
|
||||||
|
|
||||||
if len(response) > 0 and 'template' in response[0]:
|
|
||||||
return response
|
|
||||||
|
|
||||||
return []
|
|
||||||
|
|
||||||
def get_template_statistics_for_template(self, service_id, template_id):
|
def get_template_statistics_for_template(self, service_id, template_id):
|
||||||
|
|
||||||
return self.get(
|
return self.get(
|
||||||
|
|||||||
Reference in New Issue
Block a user