Skip to content

Commit

Permalink
monkeypatch Undefined to show as empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Apr 17, 2024
1 parent 6982333 commit f03e333
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lcviz/plugins/metadata_viewer/metadata_viewer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
from astropy.io.fits.card import Undefined

from jdaviz.configs.default.plugins import MetadataViewer
from jdaviz.core.registries import tray_registry

__all__ = ['MetadataViewer']


# monkeypatch astropy.io.fits.card.Undefined to show an empty string
# instead of '<astropy.io.fits.card.Undefined object at 0x29f5b94d0>'
Undefined.__str__ = lambda x: ''


@tray_registry('lcviz-metadata-viewer', label="Metadata")
class MetadataViewer(MetadataViewer):
"""
Expand Down

0 comments on commit f03e333

Please sign in to comment.