瀏覽代碼

Merge pull request #18516 from tobiasge/dont-fail-on-debug

Fix #18515: Don't fail in DEBUG mode
bctiemann 1 年之前
父節點
當前提交
9ac79ebbdf
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      netbox/core/apps.py

+ 4 - 1
netbox/core/apps.py

@@ -28,4 +28,7 @@ class CoreConfig(AppConfig):
 
         # Clear Redis cache on startup in development mode
         if settings.DEBUG:
-            cache.clear()
+            try:
+                cache.clear()
+            except Exception:
+                pass