Skip to content

list vs int tpyes for metric= and channel= in measurements_list and WriteOnlyMeasurementSerializer #22

@alexhutko

Description

@alexhutko

writing measurements allows using channel_id and metric_id as solo ints:
measurement = WriteOnlyMeasurementSerializer(metric=metric_id, channel=channel_id, value=my_value...

reading measurements requires them to be in a list even if that list has only one element:
api_measurement_measurements_list( metric=[metric_id], channel=[channel_id], starttime=T1, endtime=T2)

For the reading of measurements, this is a different behavior than before when solo ints were accepted. Was this because it was allowing slop before and shouldn't have accepted "metric=metric_id"?

When I add multiple values to the list, e.g. metric = [84,85,86], I only get returned the measurements from the last element in the list, in this case metric_id = 86. This leads me to think only one channelID and one metricID are accepted. If that is true, we should change this to require solo ints rather than [int]. If it should return measurement values for 84,85,and 86, then there's a bug.

Let me know if I'm totally off my rocker and missing something...

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions