[32] fix template None variable

pull/968/head
meisnate12 2 years ago
parent f7a5d60d88
commit a239f0f3d5

@ -1 +1 @@
1.17.1-develop31 1.17.1-develop32

@ -136,15 +136,13 @@ class DataFile:
if not name and "name" in template: if not name and "name" in template:
name = template["name"] name = template["name"]
elif not name:
name = mapping_name
name_var = f"{self.data_type.lower()}_name" variables[f"{self.data_type.lower()}_name"] = str(name)
if name_var not in variables:
variables[name_var] = str(name)
variables["library_type"] = self.library.type.lower() if self.library else "items" variables["library_type"] = self.library.type.lower() if self.library else "items"
variables["library_name"] = self.library.name if self.library else "playlist" variables["library_name"] = self.library.name if self.library else "playlist"
for temp_key, temp_value in temp_vars.items(): for temp_key, temp_value in temp_vars.items():
if temp_value is None: if temp_value is None:
optional.append(str(temp_key)) optional.append(str(temp_key))

Loading…
Cancel
Save