From 6bd0c6466ade34b7e91afb3440cdbd6b2dc62f79 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 10 Sep 2025 18:54:08 +0200 Subject: 🐛 fix empty columns in data export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/views_item.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index e4a9333b4..5e9135c7a 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -3091,10 +3091,17 @@ def get_item( else: lnk = lnk.replace("", "") res["link"] = lnk + delta = 0 for idx, value in enumerate(data[1:]): - if not value or idx >= len(table_cols): + if not value: + continue + table_col = None + while not table_col and (idx + delta) < len(table_cols): + table_col = table_cols[idx + delta] + if not table_col: + delta += 1 + if (idx + delta) >= len(table_cols): continue - table_col = table_cols[idx] if type(table_col) not in (list, tuple): table_col = [table_col] tab_cols = [] -- cgit v1.2.3