X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fhomeview.py;h=b0236525b3ef8fd7f29e3091e256fdfe2a28e755;hb=7e19fc4b81e6fb6dbb2f4655271b8839922929b5;hp=350378766109fb0bda363a94c2ab44386f927879;hpb=c93e8552cd6d1c3e3103e8e8a062d0ff434200dd;p=myslice.git diff --git a/portal/homeview.py b/portal/homeview.py index 35037876..b0236525 100644 --- a/portal/homeview.py +++ b/portal/homeview.py @@ -69,6 +69,10 @@ class HomeView (FreeAccessView, ThemeView): activity.user.login(self.request) ## check user is pi or not + platform_details = {} + account_details = {} + acc_auth_cred = {} + acc_user_cred = {} platform_query = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled') account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config') platform_details = execute_query(self.request, platform_query) @@ -118,7 +122,12 @@ class HomeView (FreeAccessView, ThemeView): env = self.default_env() acc_auth_cred={} if request.user.is_authenticated(): + ## check user is pi or not + platform_details = {} + account_details = {} + acc_auth_cred = {} + acc_user_cred = {} platform_query = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled') account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config') # XXX Something like an invalid session seems to make the execute fail sometimes, and thus gives an error on the main page