app/soc/logic/models/club_admin.py
changeset 1062 f7ee38ebfe1c
parent 944 5ea2bd9e3fa6
child 1085 0afbdd0905ef
equal deleted inserted replaced
1061:09c243461de8 1062:f7ee38ebfe1c
    40     """
    40     """
    41 
    41 
    42     super(Logic, self).__init__(model=model, base_model=base_model,
    42     super(Logic, self).__init__(model=model, base_model=base_model,
    43                                 scope_logic=scope_logic)
    43                                 scope_logic=scope_logic)
    44 
    44 
       
    45   def _onCreate(self, entity):
       
    46     """Marks the Club for this Club Admin as active it's state is new.
       
    47     """
       
    48 
       
    49     club_entity = entity.scope
       
    50 
       
    51     if club_entity.state == 'new':
       
    52       # this club is new so mark as active
       
    53       fields = {'state' : 'active'}
       
    54       club_logic.logic.updateEntityProperties(club_entity, fields)
       
    55 
       
    56     # call super
       
    57     super(Logic, self)._onCreate(entity)
    45 
    58 
    46 logic = Logic()
    59 logic = Logic()