Avoid running queries with empty parameter for in_() as SQLAlchemy complains that such queries are slow.
Avoid running queries with empty parameter for in_() as SQLAlchemy complains that such queries are slow.

kurtraschke/tph