[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/utils luci_admin



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2006-08-03 12:26:39

Modified files:
	luci/utils     : luci_admin 

Log message:
	fix a couple of restore bugs

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/utils/luci_admin.diff?cvsroot=cluster&r1=1.35&r2=1.36

--- conga/luci/utils/luci_admin	2006/08/03 03:58:23	1.35
+++ conga/luci/utils/luci_admin	2006/08/03 12:26:38	1.36
@@ -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')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]