'null' parameter query
cudasnyk opened this issue · 1 comments
using a flask - whooshee out this message:
/home/dmitry/projects/tut9/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:3779: SAWarning: Textual SQL expression 'null' should be explicitly declared as text('null') (this warning may be suppressed after 10 occurrences)
{"expr": util.ellipses_string(element)})
views.py:
res = Items.query.whooshee_search('panel').all()
models.py:
@whooshee.register_model('title', 'body')
class Items(db.Model):
tablename = 'items'
bind_key = 'items'
id = db.Column(db.Integer, primary_key = True)
title = db.Column(db.Unicode)
body = db.Column(db.Text)
init.py:
app.register_blueprint(bla1)
app.register_blueprint(bla2)
app.register_blueprint(bla3)
from app.database import db, bcrypt, whooshee
whooshee.init_app(app)
database.py:
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.bcrypt import Bcrypt
from flask.ext.whooshee import Whooshee
db = SQLAlchemy()
bcrypt = Bcrypt()
whooshee = Whooshee()
Hi, thanks for the report. This is now fixed and released in flask-whooshee 0.0.8. Enjoy!