mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-06 00:48:46 -04:00
Fix empty folder message
Sometimes, when filtering the view by template type, the message was saying the folder was empty, when really it should have been saying that there were no templates of the ‘type’ you’re looking for, eg: > There are no email templates in this folder This was because it was looking at the filtered list of templates, not all templates to determine whether a folder was really empty.
This commit is contained in:
@@ -24,10 +24,10 @@ class TemplateList():
|
||||
yield TemplateListFolder(
|
||||
item,
|
||||
folders=self.service.get_template_folders(
|
||||
self.template_type, item['id']
|
||||
template_type, item['id']
|
||||
),
|
||||
templates=self.service.get_templates(
|
||||
self.template_type, item['id']
|
||||
template_type, item['id']
|
||||
),
|
||||
ancestors=ancestors,
|
||||
service_id=self.service.id,
|
||||
@@ -38,7 +38,7 @@ class TemplateList():
|
||||
yield sub_item
|
||||
|
||||
for item in self.service.get_templates(
|
||||
self.template_type, template_folder_id
|
||||
template_type, template_folder_id
|
||||
):
|
||||
yield TemplateListTemplate(
|
||||
item,
|
||||
|
||||
Reference in New Issue
Block a user