mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Reuse TemplateList to display move-to options
This is slightly less efficient than getting the folder dicts from "get_user_template_folders" directly, since: - TemplateList returns both templates and folders. - TemplateList encapsulates the dicts in model classes. We'll compensate for this later on: - We'll introduce a new caching approach to make the call fast. - We'll expose a property to avoid the "if" in the comprehension.
This commit is contained in:
@@ -157,6 +157,7 @@ class TemplateListFolder(TemplateListItem):
|
||||
service_id,
|
||||
):
|
||||
super().__init__(folder, ancestors)
|
||||
self.folder = folder
|
||||
self.service_id = service_id
|
||||
self.number_of_templates = len(templates)
|
||||
self.number_of_folders = len(folders)
|
||||
|
||||
Reference in New Issue
Block a user