def METHOD_NAME(self, validated_data):
    if 'primary_location' in validated_data and isinstance(validated_data['primary_location'], dict):
        location = validated_data.pop('primary_location', {})
    else:
        location = None
    instance = super(OrganisationSerializer, self).METHOD_NAME(validated_data)
    if location is not None:
        location['location_target'] = instance.pk
        serializer = OrganisationLocationSerializer(data=location)
        try:
            serializer.is_valid(raise_exception=True)
        except Exception:
            # Delete organisation if location could not be created
            instance.delete()
            raise
        else:
            serializer.save()
            instance.refresh_from_db()
    return instance