diff --git a/jdaviz/configs/default/plugins/metadata_viewer/metadata_viewer.py b/jdaviz/configs/default/plugins/metadata_viewer/metadata_viewer.py index f683217bfe..4109912e31 100644 --- a/jdaviz/configs/default/plugins/metadata_viewer/metadata_viewer.py +++ b/jdaviz/configs/default/plugins/metadata_viewer/metadata_viewer.py @@ -75,7 +75,7 @@ def find_public_metadata(self, meta, primary_only=False): del d[badkey] if COMMENTCARD_KEY in meta: - self.has_comments = True + has_comments = True def get_comment(key): if key in meta[COMMENTCARD_KEY]._header: @@ -84,7 +84,7 @@ def get_comment(key): val = '' return val else: - self.has_comments = False + has_comments = False def get_comment(key): return '' @@ -94,9 +94,9 @@ def get_comment(key): if len(public_meta) > 0: self.metadata = public_meta self.has_metadata = True + self.has_comments = has_comments else: - self.metadata = [] - self.has_metadata = False + self.reset() # TODO: If this is natively supported by asdf in the future, replace with native function.