https://github.com/etianen/django-watson/blob/master/watson/search.py#L568 creates a unqualified Cast for the primary key column, which fails if the QuerySet has JOINs (e.g. because it's already filtered): ``` SELECT ("id"::text) AS "watson_pk_str" FROM "model_a_table" U0 INNER JOIN "model_b_table" U1 ON (U0."foo_id" = U1."id") WHERE U1."bar" = 20 ``` The Cast should use `U0.id` as the column selector.
https://github.com/etianen/django-watson/blob/master/watson/search.py#L568 creates a unqualified Cast for the primary key column, which fails if the QuerySet has JOINs (e.g. because it's already filtered):
The Cast should use
U0.idas the column selector.