Skip to content

Commit

Permalink
Issue 1537: Do not perform business logic validation when deleting a …
Browse files Browse the repository at this point in the history
…Deposit Location.

When deleting a Deposit Location, the validity of its values are meaningless.
In fact, there are times when the data is bad and it is being deleted because the data is bad.

This same behavior can likely be repeated for other Entity Models as well.
  • Loading branch information
kaladay committed Jun 27, 2023
1 parent 6ed6263 commit 656cb92
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public ApiResponse updateDepositLocation(@WeaverValidatedModel DepositLocation d
// This endpoint is broken. Unable to deserialize Packager interface!!
@PreAuthorize("hasRole('MANAGER')")
@RequestMapping(value = "/remove", method = POST)
@WeaverValidation(business = { @WeaverValidation.Business(value = DELETE) })
public ApiResponse removeDepositLocation(@WeaverValidatedModel DepositLocation depositLocation) {
logger.info("Removing deposit location with name " + depositLocation.getName());
depositLocationRepo.remove(depositLocation);
Expand Down

0 comments on commit 656cb92

Please sign in to comment.