Fixed error when adding data to a datapoint without triggers.
This commit is contained in:
parent
22f6b6a413
commit
3109124a88
@ -101,6 +101,11 @@ func TriggersRetrieveByDatapoint(datapointName string) (triggers []Trigger, err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// no triggers found for this datapoint.
|
||||||
|
if data == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
err = json.Unmarshal(data, &triggers)
|
err = json.Unmarshal(data, &triggers)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = werr.Wrap(err).WithData(datapointName)
|
err = werr.Wrap(err).WithData(datapointName)
|
||||||
|
Loading…
Reference in New Issue
Block a user