Skip to content

Commit 2cff8d5

Browse files
author
Enric Sala
committed
Simplify the series builder code, no need for value type checks
The series builder delegates the line protocol implementation to the point builder, which already does type checks
1 parent 40d1ed9 commit 2cff8d5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

influxdb-client/Series.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,10 @@
7777
field = obj.Fields{f};
7878
name = field.key;
7979
value = field.value;
80-
if isnumeric(value) || islogical(value)
81-
point.field(name, value(i));
82-
elseif iscell(value)
80+
if iscell(value)
8381
point.field(name, value{i});
8482
else
85-
error('unsupported value type');
83+
point.field(name, value(i));
8684
end
8785
end
8886
point.time(obj.Time(i));

0 commit comments

Comments
 (0)