mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Updated Point.php to stop converting value to float
Converting a value to a float causes a conflict "field type conflict: input field "value" on measurement "datapoints" is type int64, already exists as type float". For example, If i send 2.01, it works, if I send 2.00, it converts it into 2 and then Influxdb treats it as an integer.
This commit is contained in:
@@ -58,7 +58,7 @@ class Point
|
||||
$this->fields = $additionalFields;
|
||||
|
||||
if ($value) {
|
||||
$this->fields['value'] = (float) $value;
|
||||
$this->fields['value'] = $value;
|
||||
}
|
||||
|
||||
if ($timestamp && !$this->isValidTimeStamp($timestamp)) {
|
||||
|
||||
Reference in New Issue
Block a user