Ejemplo n.º 1
0
 def get_description(self):
     if self.what == 'UPDATE_LOCATION':
         location_id = int(self.identifier.strip('UPDATE_LOCATION_'))
         return _get_description_of_update_location(location_id)
     elif self.what == 'RECEIVE_FEEDBACK':
         feedback_id = self.identifier.strip('RECEIVE_FEEDBACK_')
         return _get_description_of_receive_feedback(feedback_id)
     else:
         return self.description
Ejemplo n.º 2
0
 def get_description(self):
     if self.what == 'UPDATE_LOCATION':
         location_id = int(self.identifier.strip('UPDATE_LOCATION_'))
         return _get_description_of_update_location(location_id)
     elif self.what == 'RECEIVE_FEEDBACK':
         feedback_id = self.identifier.strip('RECEIVE_FEEDBACK_')
         return _get_description_of_receive_feedback(feedback_id)
     elif self.what == 'CHILD_SIGNAL_CREATED':
         return f'Melding {self.extra}'
     elif self.what == 'UPDATE_SLA':
         if self.description is None:
             return EMPTY_HANDLING_MESSAGE_PLACEHOLDER_MESSAGE
         return self.description
     else:
         return self.description
Ejemplo n.º 3
0
 def get_description(self):
     """
     "get_description" copied from History
     Present for backwards compatibility
     """
     what = self.what
     if what == 'UPDATE_LOCATION':
         description = _get_description_of_update_location(int(self.object_pk))
     elif what == 'RECEIVE_FEEDBACK':
         description = _get_description_of_receive_feedback(uuid.UUID(self.object_pk))
     elif what == 'CHILD_SIGNAL_CREATED':
         description = f'Melding {self.extra}'
     elif what == 'UPDATE_SLA' and self.description is None:
         description = EMPTY_HANDLING_MESSAGE_PLACEHOLDER_MESSAGE
     else:
         description = self.description
     return description