diff --git a/listener/templates.go b/listener/templates.go index 78ddd80d8..e9fe8cd24 100644 --- a/listener/templates.go +++ b/listener/templates.go @@ -88,6 +88,11 @@ func TemplateUpdate(template mqueue.TemplateResponse) error { return errors.Wrap(err, "saving account into the database") } + // fix empty EnvironmentID until Content Sources will start sending it + if template.EnvironmentID == "" { + template.EnvironmentID = strings.ReplaceAll(template.UUID, "-", "") + } + row := models.Template{ RhAccountID: accountID, UUID: template.UUID,