Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions listener/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ func hostTemplate(tx *gorm.DB, accountID int, host *Host) *int64 {
var templateID *int64

if hasTemplateRepo(&host.SystemProfile) {
if host.SystemProfile.OwnerID == nil {
utils.LogWarn("inventoryID", host.ID, "Unable to assign templates: missing owner_id")
return templateID
}

// check system's env in candlepin
resp, err := callCandlepinEnvironment(base.Context, host.SystemProfile.OwnerID.String())
if err != nil {
Expand Down
Loading