Skip to content

Commit

Permalink
Merge pull request #283 from the-deep/fix-report-export
Browse files Browse the repository at this point in the history
Add additional check for tabular field in Data Series Entry
  • Loading branch information
frozenhelium authored Apr 29, 2019
2 parents 5bef4bf + aea9547 commit 6a53103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/export/entries/report_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def _generate_for_entry(self, entry):
if entry.entry_type == Entry.IMAGE:
image = entry.image
# para.add_run().add_image(entry.image)
elif entry.entry_type == Entry.DATA_SERIES:
elif entry.entry_type == Entry.DATA_SERIES and entry.tabular_field:
image = viz_renderer.get_entry_image(entry)
health_stats = entry.tabular_field.cache.get('health_stats', {})
health_stats = (entry.tabular_field.cache or {}).get('health_stats', {})
image_text = ' Total values: {}, Invalid value: {}, Null value: {}'.format(
health_stats.get('total', 'N/A'),
health_stats.get('invalid', 'N/A'),
Expand Down

0 comments on commit 6a53103

Please sign in to comment.