Ignore:
Timestamp:
25 May 2013, 05:59:03 (11 years ago)
Author:
Henrik Bettermann
Message:

Do not raise exception if local role has been removed in code.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r10099 r10227  
    526526        site_url = self.url(grok.getSite())
    527527        for local_role in local_roles.keys():
    528             role_title = dict(get_all_roles())[local_role].title
     528            role_title = getattr(
     529                dict(get_all_roles()).get(local_role, None), 'title', None)
    529530            objects_string = ''
    530531            for object in local_roles[local_role]:
  • main/waeup.kofa/trunk/src/waeup/kofa/permissions.py

    r10226 r10227  
    392392        user = grok.getSite()['users'].get(user_name,None)
    393393        user_title = getattr(user, 'title', user_name)
    394         local_role_title = dict(get_all_roles())[local_role].title
     394        local_role_title = getattr(
     395            dict(get_all_roles()).get(local_role, None), 'title', None)
    395396        yield dict(user_name = user_name,
    396397                   user_title = user_title,
Note: See TracChangeset for help on using the changeset viewer.