[v6r12] Small bugfix to avoid SQL errors

... when taskIDs list is empty.