'This is used in bulk updates to determine the identity of an object.
The default is to use the id of an object, but we want to override that
and consider the language code to be the canonical identity of a
LanguageProficiency model.'

def get_identity(self, data):

    try:
        return data.get('code', None)
    except AttributeError:
        return None
