From ae2bd5ed7eb5dbed17e562a5f7ca246727de3117 Mon Sep 17 00:00:00 2001 From: "13621160019@163.com" <13621160019@163.com> Date: Sun, 10 Apr 2022 20:42:14 +0800 Subject: [PATCH] fixed tuple index error in combinedequipment api --- myems-api/core/combinedequipment.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/myems-api/core/combinedequipment.py b/myems-api/core/combinedequipment.py index 62a03857..ae2f5ae3 100644 --- a/myems-api/core/combinedequipment.py +++ b/myems-api/core/combinedequipment.py @@ -29,9 +29,9 @@ class CombinedEquipmentCollection: cost_center_dict = dict() if rows_cost_centers is not None and len(rows_cost_centers) > 0: for row in rows_cost_centers: - cost_center_dict[row['id']] = {"id": row[0], - "name": row[1], - "uuid": row[2]} + cost_center_dict[row[0]] = {"id": row[0], + "name": row[1], + "uuid": row[2]} query = (" SELECT id, name, uuid, " " is_input_counted, is_output_counted, "