'Enforce all languages are unique.'

def validate_language_proficiencies(self, value):

    language_proficiencies = [language for language in value]
    unique_language_proficiencies = set((language['code'] for language in language_proficiencies))
    if (len(language_proficiencies) != len(unique_language_proficiencies)):
        raise serializers.ValidationError('The    language_proficiencies    field    must    consist    of    unique    languages')
    return value
