BASIN-3D/django-basin3d

utc_offset = 0 is dropped from MeasurementTimeseriesTVPObservationSerializer

Opened this issue · 0 comments

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:

  1. Can change line 492 to be if instance.getattribute(field) is None:
  2. 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.