summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-09-10 18:54:08 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-10-15 19:33:00 +0200
commit6bd0c6466ade34b7e91afb3440cdbd6b2dc62f79 (patch)
treea0dda680674554d2e219dd7840e78aeb58551e13
parent561853a625afa41ed3941a32b2453af560a90c1a (diff)
downloadIshtar-6bd0c6466ade34b7e91afb3440cdbd6b2dc62f79.tar.bz2
Ishtar-6bd0c6466ade34b7e91afb3440cdbd6b2dc62f79.zip
🐛 fix empty columns in data export
-rw-r--r--ishtar_common/views_item.py11
1 files 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("<lock>", "")
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 = []