Skip to content

Commit

Permalink
RHINENG-10439: create EnvironmentID if message does not contain it
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMraka authored and psegedy committed Jun 19, 2024
1 parent 4cafd7f commit 7aaaf96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions listener/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7aaaf96

Please sign in to comment.