1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

use isEmpty check for valid object on session limit

This commit is contained in:
Jared Tabor 2015-10-02 00:43:41 -04:00
parent 4570535477
commit 2056ac16d5
2 changed files with 2 additions and 3 deletions

View File

@ -94,8 +94,7 @@ export default
$rootScope.token_expires = null;
$rootScope.login_username = null;
$rootScope.login_password = null;
clearTimeout($rootScope.idleTimer);
clearTimeout($rootScope.endTimer);
$rootScope.sessionTimer.expireSession();
},
getLicense: function () {

View File

@ -21,7 +21,7 @@
return config;
},
responseError: function(rejection){
if(rejection.data.detail && rejection.data.detail === "Maximum per-user sessions reached"){
if( !_.isEmpty(rejection.data.detail) && rejection.data.detail === "Maximum per-user sessions reached"){
$rootScope.sessionTimer.expireSession('session_limit');
return rejection;
}