Matching data types of Static_folder & template_folder

template folder is an optional input for the flask object so to maintain similarity in inputs like Static_folder & template_folder, converted the output into string
This commit is contained in:
2021H1030039G 2022-12-05 20:28:46 +05:30 committed by GitHub
parent 066a35dd32
commit dd8d81aedf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -257,6 +257,7 @@ class Scaffold:
if value is not None: if value is not None:
value = os.fspath(value).rstrip(r"\/") value = os.fspath(value).rstrip(r"\/")
# Static folder is a string
self._static_folder = value self._static_folder = value
@property @property
@ -341,7 +342,7 @@ class Scaffold:
.. versionadded:: 0.5 .. versionadded:: 0.5
""" """
if self.template_folder is not None: if self.template_folder is not None:
return FileSystemLoader(os.path.join(self.root_path, self.template_folder)) return str(FileSystemLoader(os.path.join(self.root_path, self.template_folder)))
else: else:
return None return None