Skip to content

Commit

Permalink
Merge pull request #80 from siemens/fix/license_import
Browse files Browse the repository at this point in the history
fix(import_licenses): New licenses were not being created on import
  • Loading branch information
GMishx authored Aug 13, 2024
2 parents bfded19 + 6faf87a commit c3eb14a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/api/licenses.go
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,7 @@ func InsertOrUpdateLicenseOnImport(tx *gorm.DB, newLicenseMap map[string]interfa

result := tx.
Where(&models.LicenseDB{Shortname: newLicenseMap["rf_shortname"].(string)}).
Attrs(newLicenseMap).
FirstOrCreate(&oldLicense)
if result.Error != nil {
message = fmt.Sprintf("failed to create license: %s", result.Error.Error())
Expand Down

0 comments on commit c3eb14a

Please sign in to comment.