@staticmethod
    def _get_default_field_kwargs(model, field):
        """
        Get the required attributes from the model field in order
        to instantiate a REST Framework serializer field.
        """
        kwargs = {}
        if field.model_attr in model._meta.get_all_field_names():
            model_field = model._meta.get_field_by_name(field.model_attr)[0]
            kwargs = get_field_kwargs(field.model_attr, model_field)

            # Remove stuff we don't care about!
            delete_attrs = [
                "allow_blank",
                "choices",
                "model_field",
            ]
            for attr in delete_attrs:
                if kwargs in attr:
                    del kwargs[attr]

        return kwargs
dataset/ETHPy150Open inonit/drf-haystack/drf_haystack/serializers.py/HaystackSerializer._get_default_field_kwargs/swapped operands of `in`