diff --git a/apps/export/entries/report_exporter.py b/apps/export/entries/report_exporter.py index 0e6c3ea54c..7b6ae7b3a6 100644 --- a/apps/export/entries/report_exporter.py +++ b/apps/export/entries/report_exporter.py @@ -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'),