utc_offset = 0 is dropped from MeasurementTimeseriesTVPObservationSerializer
Opened this issue · 0 comments
vchendrix commented
For the MeasurementTimeseriesTVPObservationSerializer drops utc_offset when the value = 0 b/c 0 is interpreted as False.
line 492: if not instance.getattribute(field):
We want utc_offset values of 0 to be kept and shown in the viewset. So 2 options:
- Can change line 492 to be if instance.getattribute(field) is None:
- Can remove utc_offset from the optional fields in line 462.
All of the other optional fields are text field so the current construction of line 492 would work for all the others. B/c we don't have solid testing, I am leaning toward option 2.