'Returns total time spent on the task, based on assigned TimeSlots
:rtype timedelta'

def get_total_time(self):

    total = timedelta()
    for slot in self.tasktimeslot_set.all():
        total += slot.get_time()
    return total
