Explorar o código

[core] Avoid old Hue 3 warning for API calls

Romain Rigaux %!s(int64=4) %!d(string=hai) anos
pai
achega
4a901ca04d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      desktop/core/src/desktop/views.py

+ 1 - 1
desktop/core/src/desktop/views.py

@@ -552,7 +552,7 @@ def get_banner_message(request):
   if hasattr(request, 'environ'):
     message = None
     path_info = request.environ.get("PATH_INFO")
-    if path_info.find("/hue") < 0 and path_info.find("accounts/login") < 0:
+    if path_info.find("/hue") < 0 and path_info.find("accounts/login") < 0 and not request.path.startswith('/api/'):
       url = request.build_absolute_uri("/hue")
       link = '<a href="%s" style="color: #FFF; font-weight: bold">%s</a>' % (url, url)
       message = _('You are accessing an older version of Hue, please switch to the latest version: %s.') % link