Преглед изворни кода

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