Compassion projects

You are doing exactly the same thing with the list of activities in 'specials' than with the list not in 'specials'.
Therefore you can remove your 'specials' list and process the whole 'case_study.family_duties_ids' at once :
    activities = [activity.value_de if activity.value_de else activity.value_en for activity in case_study.family_duties_ids]