From f76aed7f31e8709045880d7f9ec84f358571193f Mon Sep 17 00:00:00 2001 From: Tim Lister Date: Thu, 8 Feb 2024 15:13:26 -0800 Subject: [PATCH] Fix Quantity comparison which has changed behaviour --- src/etc/etc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/etc/etc.py b/src/etc/etc.py index a73e070..69ef3ef 100644 --- a/src/etc/etc.py +++ b/src/etc/etc.py @@ -162,7 +162,8 @@ def photons_from_source( standard_filter = self._convert_filtername(filtername) band = self._map_filter_to_standard(mag_filter) print(band.meta.get("expr", "Unknown"), type(source_spec)) - source_spec = source_spec or self._vega + if source_spec is None: + source_spec = self._vega if type(source_spec) != SourceSpectrum: raise ETCError("Invalid sourcespec; must be a SourceSpectrum")