Skip to content

Commit

Permalink
fallback for object-cache
Browse files Browse the repository at this point in the history
* mosviz tests are failing on GitHub CI, but not locally, because not found in cache.  Could just be a different order of callbacks being processed, so this should result in the same thing and force the cache to be populated
  • Loading branch information
kecnry committed Mar 16, 2023
1 parent b60bd61 commit f9b46cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jdaviz/configs/imviz/plugins/coords_info/coords_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def _spectrum_viewer_update(self, viewer, x, y):
def _cursor_fallback():
statistic = getattr(viewer.state, 'function', None)
cache_key = (viewer.state.layers[0].layer.label, statistic)
sp = self.app._get_object_cache[cache_key]
sp = self.app._get_object_cache.get(cache_key, viewer.data()[0])
self._dict['axes_x'] = x
self._dict['axes_x:unit'] = sp.spectral_axis.unit.to_string()
self._dict['axes_y'] = y
Expand Down

0 comments on commit f9b46cf

Please sign in to comment.