app/soc/logic/models/host.py
changeset 1085 0afbdd0905ef
parent 1062 f7ee38ebfe1c
child 1140 a8eaea0b268d
equal deleted inserted replaced
1084:9c4221f7b747 1085:0afbdd0905ef
    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 
    45 
    46   def _onCreate(self, entity):
    46   def _onCreate(self, entity):
    47     """Marks the Sponsor for this Host as active it's state is new.
    47     """Marks the Sponsor for this Host as active it's status is new.
    48     """
    48     """
    49 
    49 
    50     sponsor_entity = entity.scope
    50     sponsor_entity = entity.scope
    51 
    51 
    52     if sponsor_entity.state == 'new':
    52     if sponsor_entity.status == 'new':
    53       # this sponsor is new so mark as active
    53       # this sponsor is new so mark as active
    54       fields = {'state' : 'active'}
    54       fields = {'status' : 'active'}
    55       sponsor_logic.logic.updateEntityProperties(sponsor_entity, fields)
    55       sponsor_logic.logic.updateEntityProperties(sponsor_entity, fields)
    56 
    56 
    57     # call super
    57     # call super
    58     super(Logic, self)._onCreate(entity)
    58     super(Logic, self)._onCreate(entity)
    59 
    59