This looks reasonable. But can you simplify the WHERE clause creation? It looks like 'query' will now contain a single item, so ' AND '.join()ing it is probably pointless.
« Back to merge proposal
This looks reasonable. But can you simplify the WHERE clause creation? It looks like 'query' will now contain a single item, so ' AND '.join()ing it is probably pointless.