@detail_route(methods=['post'])
    def allocate_floating_ip(self, request, pk=None):
        """
        Allocate floating IP from external network.
        """
        membership = self.get_object()

        if not membership.external_network_id:
            return Response({'detail': 'Cloud project membership should have an external network ID.'},
                            status=status.HTTP_409_CONFLICT)
        elif core_models.SynchronizationStates.UNSTABLE_STATES in membership.state:
            raise core_exceptions.IncorrectStateException(
                detail='Cloud project membership must be in stable state.')

        tasks.allocate_floating_ip.delay(pk)
        return Response({'detail': 'Floating IP allocation has been scheduled.'},
                        status=status.HTTP_202_ACCEPTED)
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/views.py/CloudProjectMembershipViewSet.allocate_floating_ip/swapped operands of `in`