Skip to content

Commit 2001be2

Browse files
committed
detection catalog "nan" values in detect_dict fix
1 parent 25e4036 commit 2001be2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sofiax/merge.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ async def match_merge_detections(conn, schema: str, vo_datalink_url: str,
208208
detect_dict = {}
209209
for i, item in enumerate(j['TD']):
210210
try:
211-
detect_dict[detect_names[i]] = float(item)
211+
# NOTE: handle cases where field contains "nan"
212+
if "nan" in item:
213+
detect_dict[detect_names[i]] = None
214+
else:
215+
detect_dict[detect_names[i]] = float(item)
212216
except ValueError:
213217
detect_dict[detect_names[i]] = item
214218

0 commit comments

Comments
 (0)