From: Loic Baron Date: Fri, 13 Dec 2013 17:47:36 +0000 (+0100) Subject: fixed bug if a platform is disabled but the user still has accounts on this platform X-Git-Tag: myslice-0.3-0~88 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=3e7d6bec45272c88745574bbef3d7c750931c515 fixed bug if a platform is disabled but the user still has accounts on this platform --- diff --git a/portal/accountview.py b/portal/accountview.py index 429b2d88..3d1fdb1d 100644 --- a/portal/accountview.py +++ b/portal/accountview.py @@ -63,7 +63,7 @@ class AccountView(LoginRequiredAutoLogoutView): pub_key_list = [] for platform_detail in platform_details: - if 'sfa' in platform_detail['gateway_type'] and platform_detail['disabled']==0: + if 'sfa' in platform_detail['gateway_type']: total_platform = platform_detail['platform'] total_platform_list.append(total_platform) @@ -144,7 +144,10 @@ class AccountView(LoginRequiredAutoLogoutView): platform_access_list.append(platform_access) # Removing the platform which already has access + print platform_access_list + print total_platform_list for platform in platform_access_list: + print platform total_platform_list.remove(platform) # we could use zip. this one is used if columns have unequal rows platform_list = [{'platform_no_access': t[0]}