when modifying a persistent schema, erschema may miss some permissions which wil trigger a key error, but we don't want to crash on such cases
--- a/server/schemaserial.py Thu Feb 18 12:52:34 2010 +0100
+++ b/server/schemaserial.py Thu Feb 18 12:57:57 2010 +0100
@@ -472,7 +472,12 @@
and CWGroup entities
"""
for action in erschema.ACTIONS:
- for group_or_rqlexpr in erschema.action_permissions(action):
+ try:
+ grantedto = erschema.action_permissions(action)
+ except KeyError:
+ # may occurs when modifying persistent schema
+ continue
+ for group_or_rqlexpr in grantedto:
if isinstance(group_or_rqlexpr, basestring):
# group
try: