app/soc/logic/models/role.py
changeset 1001 2faa7f80e8b2
parent 991 becede26c37f
child 1085 0afbdd0905ef
equal deleted inserted replaced
1000:9af147fc1f1c 1001:2faa7f80e8b2
    71       # in case the state of the role changes to active we flush the sidebar
    71       # in case the state of the role changes to active we flush the sidebar
    72       # cache. Other changes will be visible after the retention time expires.
    72       # cache. Other changes will be visible after the retention time expires.
    73       sidebar.flush(entity.user.account)
    73       sidebar.flush(entity.user.account)
    74 
    74 
    75     return True
    75     return True
       
    76   
       
    77   def _onCreate(self, entity):
       
    78     """Flush the sidebar cache when a new active role entity has been created.
       
    79     """
       
    80 
       
    81     if entity.state == 'active':
       
    82       sidebar.flush(entity.user.account)
    76 
    83 
    77 
    84 
    78 logic = Logic()
    85 logic = Logic()