app/soc/logic/models/request.py
changeset 2678 a525a55833f1
parent 1954 7aef36e912bb
child 3047 cdc652533fcc
equal deleted inserted replaced
2677:7df4d0fcbb80 2678:a525a55833f1
    66     if entity.status == 'group_accepted':
    66     if entity.status == 'group_accepted':
    67       # this is an invite
    67       # this is an invite
    68       notifications.sendInviteNotification(entity)
    68       notifications.sendInviteNotification(entity)
    69     elif entity.status == 'new':
    69     elif entity.status == 'new':
    70       # this is a request
    70       # this is a request
    71       # TODO(Lennard) Create a new request message
    71       notifications.sendNewRequestNotification(entity)
    72       pass
       
    73 
    72 
    74     super(Logic, self)._onCreate(entity)
    73     super(Logic, self)._onCreate(entity)
    75 
    74 
    76   def _updateField(self, entity, entity_properties, name):
    75   def _updateField(self, entity, entity_properties, name):
    77     """Called when the fields of the request are updated.
    76     """Called when the fields of the request are updated.
    85       if value == 'group_accepted':
    84       if value == 'group_accepted':
    86        # this is an invite
    85        # this is an invite
    87         notifications.sendInviteNotification(entity)
    86         notifications.sendInviteNotification(entity)
    88       elif value == 'new':
    87       elif value == 'new':
    89         # this is a request
    88         # this is a request
    90         # TODO(Lennard) Create a new request message
    89         notifications.sendNewRequestNotification(entity)
    91         pass
       
    92 
    90 
    93     return super(Logic, self)._updateField(entity, entity_properties, name)
    91     return super(Logic, self)._updateField(entity, entity_properties, name)
    94 
    92 
    95 
    93 
    96 logic = Logic()
    94 logic = Logic()