diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-04-03 16:16:59 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-04-03 16:16:59 +0200 |
commit | 5d88620443d918c389775c9f2e517141a403dc19 (patch) | |
tree | 6ffeae996b22257f9d3b4fd222a571cd59da8d17 | |
parent | 7e8d967fd5252fb2ba1c4926441b0a1087a2c6fa (diff) | |
download | Ishtar-5d88620443d918c389775c9f2e517141a403dc19.tar.bz2 Ishtar-5d88620443d918c389775c9f2e517141a403dc19.zip |
🚑️ regression: fix table export (bad permission filter)
-rw-r--r-- | ishtar_common/views_item.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index 080a6600b..3a2fb8136 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -2163,9 +2163,10 @@ def _get_table_cols(request, data_type, own_table_cols, full, model): if not hasattr(model, "TABLE_COLS_FILTERS"): return table_cols filtered_table_cols = [] - if table_cols and isinstance(table_cols[0], (list, tuple)): - # table_cols for exports are contained inside a table - table_cols = table_cols[0] + if table_cols: + # table_cols for exports are contained inside tables + table_cols = [tc[0] if (tc and isinstance(tc, (list, tuple))) else tc + for tc in table_cols] for col_name in table_cols: for key in model.TABLE_COLS_FILTERS: if not col_name.startswith(key) or \ |