diff --git a/CHANGELOG.md b/CHANGELOG.md index 45c4b4426b3d9b836205d4dbe6f617a07dd8802f..a321b688f7e07a36d22042a5fa9d4cbec62b5388 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ### Fixed - fix item count +- Restor a sale session fixed ### Security - Any security improvements. diff --git a/src/main/java/com/marketingconfort/mydressin/services/impl/SaleSessionServiceImp.java b/src/main/java/com/marketingconfort/mydressin/services/impl/SaleSessionServiceImp.java index 2bcc9063e872192c3f2c3fd4cf785e09a13734ec..367cc1f7af889f9c27e380d82b7c111a92593260 100644 --- a/src/main/java/com/marketingconfort/mydressin/services/impl/SaleSessionServiceImp.java +++ b/src/main/java/com/marketingconfort/mydressin/services/impl/SaleSessionServiceImp.java @@ -240,7 +240,6 @@ public class SaleSessionServiceImp implements SaleSessionService { public boolean deleteSaleSessionById(Long sessionId) { SaleSession saleSession = saleSessionRepository.findById(sessionId) .orElseThrow(() -> new SaleSessionNotFoundException("Sale session not found for id: " + sessionId)); - saleSession.setStatus("DELETED"); saleSessionRepository.save(saleSession); return true; @@ -252,7 +251,7 @@ public class SaleSessionServiceImp implements SaleSessionService { public SaleSessionDTO restockSaleSession(Long sessionId) { SaleSession saleSession = saleSessionRepository.findById(sessionId) .orElseThrow(() -> new SaleSessionNotFoundException("Sale session not found for id: " + sessionId)); - saleSession.setStatus(null); + saleSession.setStatus("ACTIVE"); SaleSession updatedSaleSession = saleSessionRepository.save(saleSession); return saleSessionMapper.toDTO(updatedSaleSession); }