

def process_rhs(self, compiler, connection):
    (rhs, rhs_params) = super(GISLookup, self).process_rhs(compiler, self)
    if hasattr(self.rhs, '_as_sql'):
        return (rhs, rhs_params)
    geom = self.rhs
    if isinstance(self.rhs, Col):
        geo_fld = self.rhs.output_field
        if (not hasattr(geo_fld, 'srid')):
            raise ValueError('No geographic field found in expression.')
        self.rhs.srid = geo_fld.srid
    elif isinstance(self.rhs, Expression):
        raise ValueError('Complex expressions not supported for GeometryField')
    elif isinstance(self.rhs, (list, tuple)):
        geom = self.rhs[0]
    rhs = connection.ops.get_geom_placeholder(self.lhs.output_field, geom, compiler)
    return (rhs, rhs_params)

dataset/ETHPy150Open django/django/django/contrib/gis/db/models/lookups.py GISLookup.process_rhs/VarMisuse@31/37 `connection`->`self`