def get_ajax_xeditable_choices(self, request, *args, **kwargs):
        """ AJAX GET handler for xeditable queries asking for field choice lists. """
        field_name = request.GET.get(self.xeditable_fieldname_param)
        if not field_name:
            return HttpResponseBadRequest("Field name must be given")

        queryset = self.get_queryset()
        if not self.model:
            self.model = queryset.model

        # Sanitize the requested field name by limiting valid names to the datatable_options columns
        from datatableview.views import legacy
        if isinstance(self, legacy.LegacyDatatableMixin):
            columns = self._get_datatable_options()['columns']
            for name in columns:
                if isinstance(name, (list, tuple)):
                    name = name[1]
                if name == field_name:
                    break
            else:
                return HttpResponseBadRequest("Invalid field name")
        else:
            if self.get_datatable().config['columns'] not in field_name:
                return HttpResponseBadRequest("Invalid field name")

        field = self.model._meta.get_field_by_name(field_name)[0]

        choices = self.get_field_choices(field, field_name)
        return HttpResponse(json.dumps(choices))
dataset/ETHPy150Open pivotal-energy-solutions/django-datatable-view/datatableview/views/xeditable.py/XEditableMixin.get_ajax_xeditable_choices/swapped operands of `not in`