瀏覽代碼

Don't cache CACHE_KEY_CATALOG_ERROR if ISOLATED_DEPLOYMENT is True

Brian Tiemann 1 年之前
父節點
當前提交
32422d1683
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      netbox/core/views.py

+ 1 - 1
netbox/core/views.py

@@ -594,7 +594,7 @@ class BasePluginView(UserPassesTestMixin, View):
         catalog_plugins_error = cache.get(self.CACHE_KEY_CATALOG_ERROR, default=False)
         if not catalog_plugins_error:
             catalog_plugins = get_catalog_plugins()
-            if not catalog_plugins:
+            if not catalog_plugins and not settings.ISOLATED_DEPLOYMENT:
                 # Cache for 5 minutes to avoid spamming connection
                 cache.set(self.CACHE_KEY_CATALOG_ERROR, True, 300)
                 messages.warning(request, _("Plugins catalog could not be loaded"))