Skip to content

Commit

Permalink
Ignore 'version' field
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Phoen committed Jan 17, 2025
1 parent 30c4b9a commit 8482dec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/grafana/notificationtemplate-handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ func (h *AlertNotificationTemplateHandler) Prepare(existing *grizzly.Resource, r
return &resource
}

// Unprepare removes unnecessary elements from a remote resource ready for presentation/comparison
func (h *AlertNotificationTemplateHandler) Unprepare(resource grizzly.Resource) *grizzly.Resource {
resource.DeleteSpecKey("version")
return &resource
}

func (h *AlertNotificationTemplateHandler) Validate(resource grizzly.Resource) error {
name, exist := resource.GetSpecString("name")
if resource.Name() != name && exist {
Expand Down

0 comments on commit 8482dec

Please sign in to comment.