diff --git a/pkg/api/v1/attribute_list_params.go b/pkg/api/v1/attribute_list_params.go index 11510062..0130297d 100644 --- a/pkg/api/v1/attribute_list_params.go +++ b/pkg/api/v1/attribute_list_params.go @@ -142,12 +142,15 @@ func (p *AttributeListParams) queryMods(tblName string) qm.QueryMod { where, values := p.setJSONBWhereClause(tblName, jsonPath, values) + // namespace AND JSONB query as a query mod queryMods := []qm.QueryMod{nsMod, qm.And(where, values...)} + // OR ( namespace AND JSONB query ) if p.AttributeOperator == AttributeLogicalOR { return qm.Or2(qm.Expr(queryMods...)) } + // AND ( namespace AND JSONB query ) return qm.Expr(queryMods...) }