# change the query class of this model to our own
if hasattr(model, 'query_class'):
if model.query_class is not flask_sqlalchemy.BaseQuery \
and model.query_class is not _QueryProxy:
print(model.query_class, _QueryProxy)
model.query_class = type(
'MultipliedQuery', (model.query_class, _QueryProxy), {}
)
else:
model.query_class = _QueryProxy
else:
model.query_class = _QueryProxy
So currently this plugin won't work without Flask-sqlalchemy. Specifically, if you sqlalchemy-utils.
Solution: This section: https://github.com/Revolution1/Flask-WhooshAlchemyPlus/blob/1e7a79b6d12e85e3e0fd12eb70a8d6468642359a/flask_whooshalchemyplus.py#L255
is changed to: