瀏覽代碼

HUE-7852 [core] Metric page fails on cherrypy server

Roohi 7 年之前
父節點
當前提交
5f475f7
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      desktop/core/src/desktop/lib/apputil.py

+ 2 - 0
desktop/core/src/desktop/lib/apputil.py

@@ -46,6 +46,8 @@ def get_app_for_module(module):
   for app in settings.INSTALLED_APPS:
     # TODO(philip): This is quite hacky.  If desktop becomes a more
     # full application, we'll want to separate this out more cleanly.
+    if module.__name__.startswith('desktop.lib.metrics.views'):
+      return app
     if module.__name__.startswith(app) and not module.__name__.startswith("desktop.lib"):
       return app
   return None