From ee560df0027a36537cc33c138a08c528346931f8 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sat, 16 May 2015 15:19:35 +0200 Subject: [PATCH] deleteAssociations: handle empty idList --- dak/dominate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dak/dominate.py b/dak/dominate.py index 1c77ee66..449b9595 100755 --- a/dak/dominate.py +++ b/dak/dominate.py @@ -89,7 +89,10 @@ def deleteAssociations(table, idList, session): FROM %s WHERE id = :id """ % table - session.execute(query, [{'id': id} for id in idList]) + params = [{'id': id} for id in idList] + if len(params) == 0: + return + session.execute(query, params) def doDaDoDa(suite, session): # keep this part disabled because it is too dangerous -- 2.39.5