Describe the bug
A clear and concise description of what the bug is.
When a query has one or more hidden fields, exporting for web portal will send an error.
Error: list index out of range
Traceback:
Traceback (most recent call last):
File "/opt/specify7/specifyweb/backend/stored_queries/execution.py", line 276, in do_export
query_to_web_portal_zip(
File "/opt/specify7/specifyweb/backend/stored_queries/execution.py", line 344, in query_to_web_portal_zip
return _query_to_web_portal_zip(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/stored_queries/web_portal_export.py", line 578, in query_to_web_portal_zip
data_rows = list(query_rows)
^^^^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/stored_queries/execution.py", line 1266, in apply_special_post_query_processing
row = processor(row)
^^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/stored_queries/web_portal_export.py", line 441, in trim_big_decimal
previous_value = str(row[field_index])
~~~^^^^^^^^^^^^^
IndexError: list index out of range
To Reproduce
Steps to reproduce the behavior:
-
Go to database on v7.12.1
-
Open a saved query or use Portal Mapping 2.json
-
Ensure there are hidden fields / hide fields then run the query
-
Click the "Export for Web Portal" button
-
See error in notifications
Expected behavior
A clear and concise description of what you expected to happen.
Should create export with no error.
Please fill out the following information manually:
- OS: macOS
- Browser: chrome
- Specify 7 Version: 7.12.1
Reported By
Bronwyn
Additional Context
work around (besides data exporter)
- unhide columns in query
- export for web portal
- unzip export and open csv
- remove columns that should be hidden
Describe the bug
A clear and concise description of what the bug is.
When a query has one or more hidden fields, exporting for web portal will send an error.
To Reproduce
Steps to reproduce the behavior:
Go to database on v7.12.1
Open a saved query or use Portal Mapping 2.json
Ensure there are hidden fields / hide fields then run the query
Click the "Export for Web Portal" button
See error in notifications
Expected behavior
A clear and concise description of what you expected to happen.
Should create export with no error.
Please fill out the following information manually:
Reported By
Bronwyn
Additional Context
work around (besides data exporter)