Skip to content
Extraits de code Groupes Projets
Valider b01b2e9e rédigé par Mohamed Lemine BAILLAHI's avatar Mohamed Lemine BAILLAHI
Parcourir les fichiers

Merge branch 'MS-71' into 'develop'

fix bug in restor sale session functionality

Closes MS-71

See merge request !116
parents d9feb058 45c38bcf
Branches
1 requête de fusion!116fix bug in restor sale session functionality
Pipeline #13798 en échec avec les étapes
in 43 secondes
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
### Fixed ### Fixed
- fix item count - fix item count
- Restor a sale session fixed
### Security ### Security
- Any security improvements. - Any security improvements.
......
...@@ -240,7 +240,6 @@ public class SaleSessionServiceImp implements SaleSessionService { ...@@ -240,7 +240,6 @@ public class SaleSessionServiceImp implements SaleSessionService {
public boolean deleteSaleSessionById(Long sessionId) { public boolean deleteSaleSessionById(Long sessionId) {
SaleSession saleSession = saleSessionRepository.findById(sessionId) SaleSession saleSession = saleSessionRepository.findById(sessionId)
.orElseThrow(() -> new SaleSessionNotFoundException("Sale session not found for id: " + sessionId)); .orElseThrow(() -> new SaleSessionNotFoundException("Sale session not found for id: " + sessionId));
saleSession.setStatus("DELETED"); saleSession.setStatus("DELETED");
saleSessionRepository.save(saleSession); saleSessionRepository.save(saleSession);
return true; return true;
...@@ -252,7 +251,7 @@ public class SaleSessionServiceImp implements SaleSessionService { ...@@ -252,7 +251,7 @@ public class SaleSessionServiceImp implements SaleSessionService {
public SaleSessionDTO restockSaleSession(Long sessionId) { public SaleSessionDTO restockSaleSession(Long sessionId) {
SaleSession saleSession = saleSessionRepository.findById(sessionId) SaleSession saleSession = saleSessionRepository.findById(sessionId)
.orElseThrow(() -> new SaleSessionNotFoundException("Sale session not found for id: " + sessionId)); .orElseThrow(() -> new SaleSessionNotFoundException("Sale session not found for id: " + sessionId));
saleSession.setStatus(null); saleSession.setStatus("ACTIVE");
SaleSession updatedSaleSession = saleSessionRepository.save(saleSession); SaleSession updatedSaleSession = saleSessionRepository.save(saleSession);
return saleSessionMapper.toDTO(updatedSaleSession); return saleSessionMapper.toDTO(updatedSaleSession);
} }
......
0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter