query with empty filter produces invalid SQL - WHERE AND

Issue #1011 resolved
Former user created an issue

I recently encountered this problem in code which uses query.filter_by(args, *kargs) to allow user-supplied parameters to the query. In the case where filter_by is called with no parameters, and later another filter_by is issued, SQLAlchemy generates invalid SQL (a blank WHERE clause).

See attached test case, which runs against both 0.4.5 and 0.4.6dev-r4511.

Comments (1)

  1. Michael Trier

    This is fixed, but not sure when. It works on both 0.5.x and 0.4.x. Sorry I can't be more specific than that. I see nothing in the logs that would indicate this problem. Likely it was fixed as part of another problem.

  2. Log in to comment