diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/ItemAddBundleController.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/ItemAddBundleController.java index 89a2ad104ebf..249cf916be56 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/ItemAddBundleController.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/ItemAddBundleController.java @@ -169,7 +169,6 @@ public ItemRest updateLicenseForBundle(@PathVariable UUID uuid, log.warn("Cannot find clarin license with id: " + licenseId + ". The old license will be detached, " + "but the new one will not be attached."); } - List bundles = item.getBundles(Constants.CONTENT_BUNDLE_NAME); for (Bundle clarinBundle : bundles) { List bitstreamList = clarinBundle.getBitstreams(); @@ -186,6 +185,7 @@ public ItemRest updateLicenseForBundle(@PathVariable UUID uuid, if (Objects.nonNull(clarinLicense)) { clarinLicenseService.addLicenseMetadataToItem(context, clarinLicense, item); } + itemService.update(context, item); provenanceService.editLicense(context, item, !Objects.isNull(clarinLicense)); context.commit();