resolved sonar warning about transactional
@@ -43,7 +43,6 @@ import java.util.stream.Stream;
import lombok.AllArgsConstructor;
import org.modelmapper.ModelMapper;
import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
/**
@@ -72,7 +71,7 @@ public class HabitAssignServiceImpl implements HabitAssignService {
/**
* {@inheritDoc}
*/
- @Transactional(propagation = Propagation.NESTED)
+ @Transactional
@Override
public HabitAssignManagementDto assignDefaultHabitForUser(Long habitId, UserVO userVO) {
User user = modelMapper.map(userVO, User.class);
@@ -552,6 +551,7 @@ public class HabitAssignServiceImpl implements HabitAssignService {
/**
* {@inheritDoc}
*/
+ @Transactional
@Override
public void addDefaultHabit(UserVO user, String language) {
if (habitAssignRepo.findAllByUserId(user.getId()).isEmpty()) {
