Skip to content

Commit

Permalink
handling removal only of leases when image missing date info
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyKilmory committed Nov 5, 2024
1 parent 0316c6f commit 3d077da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kahuna/public/js/usage-rights/usage-rights-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ usageRightsEditor.controller(
}
const catLeases = createCategoryLeases(ctrl.category.leases, image);
if (catLeases.length === 0) {
// possibility of removal only - missing tx date etc.
const removeLeases = removeCategoryLeases(ctrl.categories, image, prevRights);
if (removeLeases && removeLeases.length > 0) {
$rootScope.$broadcast('events:rights-category:delete-leases', {
catLeases: removeLeases,
batch: false
});
}
return;
}
$rootScope.$broadcast('events:rights-category:add-leases', {
Expand Down

0 comments on commit 3d077da

Please sign in to comment.