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

Announcement enters incorrect data types #5599

Open
ricksburnett opened this issue Apr 3, 2020 · 0 comments
Open

Announcement enters incorrect data types #5599

ricksburnett opened this issue Apr 3, 2020 · 0 comments

Comments

@ricksburnett
Copy link

Describe the bug
Adding a treatment log entry of Event Type Announcement fills protein and fat fields with empty strings.
Schema specifies these fields to be of type number

To Reproduce
Steps to reproduce the behavior:

  1. Add Announcement event to log using web interface
  2. Query API using api/v3/treatments?sort$desc=date&limit=1&eventType$eq=Announcement

Expected behavior
fat and protein fields should probably not even contain entries for an Announcement. If they need to be filled should be a number. Maybe 0 as default.

Screenshots
[{"enteredBy":"","eventType":"Announcement","reason":"","protein":"","fat":"","duration":0,"notes":"Test","created_at":"2020-04-01T20:40:33.534Z","utcOffset":0,"isAnnouncement":true,"identifier":"5e84fc4161b73397284379f4","srvModified":1585773633534,"srvCreated":1585773633534}]

Your setup information
Nightscout 13.0.1

  • What version of Nightscout (e.g. 0.10.3)

Additional context
Causes problems in applications decoding json and expecting fields to have consistent types. Can workaround by getting all treatment not type Announcement and then requesting Announcements without those fields, which aren't really needed, but that's a bit of a pain.

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

1 participant