I'm trying to use an OR on this query:
User.query.filter(or_(username==data['username'], email==data['email'])).first()
But, I get this message:
global name 'or_' is not defined
I'm using SqlAlchemy 0.9.7 (it already includes or_)
Anyone encountered this before and/or knows how to fix it?
from sqlalchemy.sql.expression import or_?import flask.ext.sqlalchemy