mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
[FIX] Check if the CustomCSS object exists
This commit is contained in:
parent
3c2c137dad
commit
710149ec21
@ -33,7 +33,12 @@ def custom_css_static(path: str) -> str:
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return ""
|
return ""
|
||||||
else:
|
else:
|
||||||
custom_css_changed = CustomCSS.objects.first().timestamp.timestamp()
|
try:
|
||||||
|
custom_css = CustomCSS.objects.get(pk=1)
|
||||||
|
except CustomCSS.DoesNotExist:
|
||||||
|
return ""
|
||||||
|
else:
|
||||||
|
custom_css_changed = custom_css.timestamp.timestamp()
|
||||||
custom_css_version = (
|
custom_css_version = (
|
||||||
str(custom_css_changed).replace(" ", "").replace(":", "").replace("-", "")
|
str(custom_css_changed).replace(" ", "").replace(":", "").replace("-", "")
|
||||||
) # remove spaces, colons, and dashes
|
) # remove spaces, colons, and dashes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user