X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fhomeview.py;h=b4faa8e2b978f82bc0f89c11e6d840996f622f42;hb=b80b6a7f021a04b435125ccf2867cf0faa20e28d;hp=ae45ee1266df8846457edde8c857081f0bb9a4ae;hpb=c96472b5f8c83d618f80eef667ee2ad561e4114d;p=myslice.git diff --git a/portal/homeview.py b/portal/homeview.py index ae45ee12..b4faa8e2 100644 --- a/portal/homeview.py +++ b/portal/homeview.py @@ -97,6 +97,7 @@ class HomeView (FreeAccessView, ThemeView): def get (self, request, state=None): env = self.default_env() + acc_auth_cred={} if request.user.is_authenticated(): ## check user is pi or not platform_query = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled') @@ -106,7 +107,7 @@ class HomeView (FreeAccessView, ThemeView): account_details = execute_query(self.request, account_query) for platform_detail in platform_details: for account_detail in account_details: - if 'platform_id' in platform_details: + if 'platform_id' in platform_detail: if platform_detail['platform_id'] == account_detail['platform_id']: if 'config' in account_detail and account_detail['config'] is not '': account_config = json.loads(account_detail['config'])