I have two queries, available and active.
If I have a row in active, I would want to exclude it from available.
See my attempt below:
active_params = (AvailParam .select() .join(AvailParamPhones) .join(Phone) .where(AvailParamPhones.phone == phone) .order_by(AvailParam.base_param.name) ) avail_params = (AvailParam .select() .join(AvailParamPhones, JOIN.LEFT_OUTER) .where( AvailParam.select() << active_params ) .order_by(AvailParam.base_param.name) )
This gives me
TypeError: unsupported operand type(s) for <<: 'ModelSelect' and 'ModelSelect'
How should I be querying while excluding members of a previous query?