Browse Source

HUE-8564 [useradmin] Fix last activity update for notebook/api/check_status

Ying Chen 7 years ago
parent
commit
afd3fa0282
1 changed files with 4 additions and 1 deletions
  1. 4 1
      apps/useradmin/src/useradmin/middleware.py

+ 4 - 1
apps/useradmin/src/useradmin/middleware.py

@@ -91,7 +91,10 @@ class LastActivityMiddleware(object):
       logout = True
       logout = True
 
 
     # Save last activity for user except when polling
     # Save last activity for user except when polling
-    if not (request.path.strip('/') == 'jobbrowser/api/jobs') and not (request.path.strip('/') == 'jobbrowser/jobs' and request.POST.get('format') == 'json') and not (request.path == '/desktop/debug/is_idle'):
+    if not (request.path.strip('/') == 'notebook/api/check_status') \
+        and not (request.path.strip('/') == 'jobbrowser/api/jobs') \
+        and not (request.path.strip('/') == 'jobbrowser/jobs' and request.POST.get('format') == 'json') \
+        and not (request.path.strip('/') == 'desktop/debug/is_idle'):
       try:
       try:
         profile.last_activity = datetime.now()
         profile.last_activity = datetime.now()
         profile.save()
         profile.save()