Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utc_offset = 0 is dropped from MeasurementTimeseriesTVPObservationSerializer #18

Open
vchendrix opened this issue Dec 10, 2020 · 0 comments
Assignees

Comments

@vchendrix
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants