From af80989c0485f1c08fc6c4c8e1bd68672633edd5 Mon Sep 17 00:00:00 2001 From: elisakiv Date: Thu, 25 Jan 2024 19:06:54 +0100 Subject: [PATCH] small fix --- src/web/static.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/web/static.py b/src/web/static.py index 8a7a7e001..74429d3d3 100644 --- a/src/web/static.py +++ b/src/web/static.py @@ -66,13 +66,14 @@ def get_full_static_url(url: str): return f"{settings.STATIC_URL}{url}" def file_hash(self, name, content=None): - normalized_file_path = Path(name).as_posix() - # Don't hash the filename if the path matches any of the patterns in the `MANIFEST_STATICFILES_IGNORE_PATTERNS` setting - if any( - fnmatchcase(normalized_file_path, pattern) - for pattern in settings.MANIFEST_STATICFILES_IGNORE_PATTERNS - ): - return None + if type(name) != (type(None)): + normalized_file_path = Path(name).as_posix() + # Don't hash the filename if the path matches any of the patterns in the `MANIFEST_STATICFILES_IGNORE_PATTERNS` setting + if any( + fnmatchcase(normalized_file_path, pattern) + for pattern in settings.MANIFEST_STATICFILES_IGNORE_PATTERNS + ): + return None return super().file_hash(name, content)