Skip to content

Commit

Permalink
handle when meta not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Dec 10, 2024
1 parent 031ce2c commit f657a92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jdaviz/core/freezable_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _convert_units_y_limits(self, old_unit, new_unit):
spectral_axis = x_corners * u.Unit(self.x_display_unit)

for layer in self.layers:
if psc := layer.layer.meta.get('_pixel_scale_factor', None) is not None:
if psc := getattr(layer.layer, 'meta', {}).get('_pixel_scale_factor', None): # noqa
spectral_axis.info.meta = {'_pixel_scale_factor',
psc}
break
Expand Down

0 comments on commit f657a92

Please sign in to comment.