Skip to content

Commit

Permalink
fix(Rest): License overview is not updating in summary page.
Browse files Browse the repository at this point in the history
Signed-off-by: Rudra Chopra <[email protected]>
  • Loading branch information
rudra-superrr committed Jan 6, 2025
1 parent c8b2756 commit c5d5131
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1264,12 +1264,14 @@ public ResponseEntity writeSpdxLicenseInfoIntoRelease(
Set<String> otherLicenseIds = licensesInfoInRequestBody.get("otherLicenseIds");

if (!CommonUtils.isNullOrEmptyCollection(licenseIds)) {
sw360Release.getMainLicenseIds().clear();
for (String licenseId : licenseIds) {
sw360Release.addToMainLicenseIds(licenseId);
}
}

if (!CommonUtils.isNullOrEmptyCollection(otherLicenseIds)) {
sw360Release.getOtherLicenseIds().clear();
for (String licenseId : otherLicenseIds) {
sw360Release.addToOtherLicenseIds(licenseId);
}
Expand Down Expand Up @@ -1686,7 +1688,6 @@ private HalResource<Release> createHalReleaseResource(Release release, boolean v
}
if (release.getMainLicenseIds() != null) {
restControllerHelper.addEmbeddedLicenses(halRelease, release.getMainLicenseIds());
release.setMainLicenseIds(null);
}
if (release.getOtherLicenseIds() != null) {
restControllerHelper.addEmbeddedOtherLicenses(halRelease, release.getOtherLicenseIds());
Expand Down

0 comments on commit c5d5131

Please sign in to comment.