From f502b7e2434f7161a1a465b75571c78d1c52906f Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Sun, 2 Oct 2016 17:38:41 +0200 Subject: [PATCH] Fixing bulk update API call with empty arrays --- taiga/base/utils/db.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/taiga/base/utils/db.py b/taiga/base/utils/db.py index eb610fff..9468077a 100644 --- a/taiga/base/utils/db.py +++ b/taiga/base/utils/db.py @@ -130,6 +130,9 @@ def update_attr_in_bulk_for_ids(values, attr, model): :params attr: attr to update :params model: Model of the ids. """ + if not values: + return + values = [str((id, order)) for id, order in values.items()] sql = """ UPDATE "{tbl}"