浏览代码

continue work

Jeremy Childers 1 年之前
父节点
当前提交
293aa9bc02
共有 1 个文件被更改,包括 3 次插入8 次删除
  1. 3 8
      coderedcms/views.py

+ 3 - 8
coderedcms/views.py

@@ -130,14 +130,9 @@ def favicon(request):
     if icon:
         # Try to convert to webp, otherwise pass original file format
         # This will happen mainly if the file is an SVG
-        try:
-            return HttpResponsePermanentRedirect(
-                icon.get_rendition("fill-256x256|format-webp").url
-            )
-        except AttributeError:
-            return HttpResponsePermanentRedirect(
-                icon.get_rendition("fill-256x256").url
-            )
+        return HttpResponsePermanentRedirect(
+            icon.get_rendition("fill-256x256|format-webp|preserve-svg").url
+        )
     raise Http404()