Open fyaconiello opened 10 years ago
https://github.com/burke-software/django-report-utils/blob/master/report_utils/mixins.py#L361
If for some reason a choice field's choice gets removed, but there is historic data pointing to that choice, this line throws the following error.
File "/home/ubuntu/web/......./venv/local/lib/python2.7/site-packages/report_utils/mixins.py", line 361, in report_to_list row[position-1] = unicode(choice_list[row[position-1]]) KeyError: u'NY '
I monkey patched that line with this for now on my install:
try: row[position-1] = unicode(choice_list[row[position-1]]) except: row[position-1] = unicode(row[position-1])
https://github.com/burke-software/django-report-utils/blob/master/report_utils/mixins.py#L361
If for some reason a choice field's choice gets removed, but there is historic data pointing to that choice, this line throws the following error.
I monkey patched that line with this for now on my install: