From db925f846618d346ca53a5af9f10eb51f9347b20 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 17 Aug 2019 00:03:14 +0200 Subject: [PATCH] Always update DetailURL: Allows deletion Signed-off-by: Knut Ahlers --- structs.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/structs.go b/structs.go index aaadc53..4a57a95 100644 --- a/structs.go +++ b/structs.go @@ -259,18 +259,15 @@ func (dm dashboardMetric) DataHistory() []string { } func (dm *dashboardMetric) Update(m *dashboardMetric) { - dm.Title = m.Title dm.Description = m.Description - dm.Status = m.Status - dm.Value = m.Value - dm.IgnoreMAD = m.IgnoreMAD + dm.DetailURL = m.DetailURL dm.HideMAD = m.HideMAD dm.HideValue = m.HideValue + dm.IgnoreMAD = m.IgnoreMAD dm.StalenessStatus = m.StalenessStatus - - if m.DetailURL != "" { - dm.DetailURL = m.DetailURL - } + dm.Status = m.Status + dm.Title = m.Title + dm.Value = m.Value if m.Expires != 0 { dm.Expires = m.Expires