Commit f2b55e1c authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Bugfix to serializer for single inspirals

Previous arrangement was not including zero-valued fields. We now
include all non-None fields.
parent a137c932
...@@ -619,7 +619,7 @@ def singleInspiralToDict(single_inspiral): ...@@ -619,7 +619,7 @@ def singleInspiralToDict(single_inspiral):
rv = {} rv = {}
for field_name in SingleInspiral.field_names(): for field_name in SingleInspiral.field_names():
value = getattr(single_inspiral, field_name, None) value = getattr(single_inspiral, field_name, None)
if value: if value is not None:
rv.update({ field_name: value }) rv.update({ field_name: value })
return rv return rv
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment