mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 11:26:26 -06:00
Cast the generator returned by find_referenced_templates() to an iterable to avoid exhausting it on the check for None
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
9f45300999
commit
9930fef28b
@ -28,7 +28,7 @@ class DataFileLoader(BaseLoader):
|
||||
raise TemplateNotFound(template)
|
||||
|
||||
# Find and pre-fetch referenced templates
|
||||
if referenced_templates := find_referenced_templates(environment.parse(template_source)):
|
||||
if referenced_templates := tuple(find_referenced_templates(environment.parse(template_source))):
|
||||
if None in referenced_templates:
|
||||
self.cache_templates({
|
||||
df.path: df.data_as_string for df in
|
||||
|
Loading…
Reference in New Issue
Block a user