conga/luci/utils luci_admin
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-08-03 12:26:39
Modified files:
luci/utils : luci_admin
Log message:
fix a couple of restore bugs
luci/utils/luci_admin +5 -3
@@ -740,7 +740,8 @@ if hasattr(i[1], '__ac_local_roles__'): roles = getattr(i[1], '__ac_local_roles__') - systems[i[0]]['permList'] = map(lambda x: x[0], filter(lambda x: len(x) > 1 and 'View' in x[1], roles.items())) + if roles: + systems[i[0]]['permList'] = map(lambda x: x[0], filter(lambda x: len(x) > 1 and 'View' in x[1], roles.items())) else: systems[i[0]]['permList'] = {}
@@ -755,12 +756,13 @@ if hasattr(i[1], '__ac_local_roles__'): roles = getattr(i[1], '__ac_local_roles__') - clusters[cluster_name]['permList'] = map(lambda x: x[0], filter(lambda x: len(x) > 1 and 'View' in x[1], roles.items())) + if roles: + clusters[cluster_name]['permList'] = map(lambda x: x[0], filter(lambda x: len(x) > 1 and 'View' in x[1], roles.items())) else: clusters[cluster_name]['permList'] = {} for csystem in i[1].objectItems(): - csystem_hash = { 'id': csystem[0], 'permList': {} } + csystem_hash = { 'id': csystem[0] } if hasattr(csystem[1], 'title'): csystem_hash['title'] = getattr(csystem[1], 'title')