diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-03-02 00:18:36 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-03-02 00:18:36 +0100 |
commit | 75b516c460c727273f2556fd76b380b742432424 (patch) | |
tree | 342a84fd6a304f2a1d32cd95c55f9cf3c7e847e0 /ishtar_common/views.py | |
parent | 3fff5e16d4f24d7ff28126be98531393bae9e49f (diff) | |
download | Ishtar-75b516c460c727273f2556fd76b380b742432424.tar.bz2 Ishtar-75b516c460c727273f2556fd76b380b742432424.zip |
Fix CSV export when export column is not well defined
Diffstat (limited to 'ishtar_common/views.py')
-rw-r--r-- | ishtar_common/views.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 2ea10d0e8..e1ae52956 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -1258,6 +1258,8 @@ def get_item(model, func_name, default_name, extra_request_keys=[], row, delta = [], 0 # regroup cols with join "|" for idx, col_name in enumerate(table_cols): + if len(data[1:]) <= idx + delta: + break val = data[1:][idx + delta].encode( ENCODING, errors='replace') if col_name and "|" in col_name[0]: |