macaron
macaron copied to clipboard
Empty Q object causes SQL syntax error
Empty Q() object will causes SQL syntax error.
q = Q()
User.select(q)
This means "SELECT * FROM user WHERE (())" in SQL. In case of empty Q object, it should be ignored.