app/soc/logic/models/role.py
changeset 1517 a467d13e34ea
parent 1308 35b75ffcbb37
child 1625 cd7174032b56
equal deleted inserted replaced
1516:8df06dc877aa 1517:a467d13e34ea
    61 
    61 
    62     group = group_logic.getForFields(fields, unique=True)
    62     group = group_logic.getForFields(fields, unique=True)
    63 
    63 
    64     return group
    64     return group
    65 
    65 
    66   def _updateField(self, entity, name, value):
    66   def _updateField(self, entity, entity_properties, name):
    67     """Special logic for role. If status changes to active we flush the sidebar.
    67     """Special logic for role. If status changes to active we flush the sidebar.
    68     """
    68     """
       
    69 
       
    70     value = entity_properties[name]
    69 
    71 
    70     if (name == 'status') and (entity.status != value) and value == 'active':
    72     if (name == 'status') and (entity.status != value) and value == 'active':
    71       # in case the status of the role changes to active we flush the sidebar
    73       # in case the status of the role changes to active we flush the sidebar
    72       # cache. Other changes will be visible after the retention time expires.
    74       # cache. Other changes will be visible after the retention time expires.
    73       sidebar.flush(entity.user.account)
    75       sidebar.flush(entity.user.account)