Skip to content

Commit

Permalink
Merge pull request #22825 from dimagi/non-string-hyperlink
Browse files Browse the repository at this point in the history
don't give hyperlink styling to non-string cells
  • Loading branch information
nickpell committed Dec 24, 2018
2 parents 164e727 + 99c49c2 commit 1c4c291
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions corehq/ex-submodules/couchexport/writers.py
Expand Up @@ -413,8 +413,10 @@ def get_write_value(value):
cell.number_format = numbers.FORMAT_TEXT
if isinstance(row, FormattedRow):
for hyperlink_column_index in row.hyperlink_column_indices:
cells[hyperlink_column_index].hyperlink = cells[hyperlink_column_index].value
cells[hyperlink_column_index].style = 'Hyperlink'
cell_value = cells[hyperlink_column_index].value
if isinstance(cell_value, six.string_types):
cells[hyperlink_column_index].hyperlink = cell_value
cells[hyperlink_column_index].style = 'Hyperlink'
sheet.append(cells)

def _close(self):
Expand Down

0 comments on commit 1c4c291

Please sign in to comment.