Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 3e6b1da

Browse files
author
ge85riz
committed
🚑 hotfix: ensure correct fields are updated during employee CSV imports
1 parent fdb7164 commit 3e6b1da

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

backend/src/main/java/com/itestra/eep/services/impl/EmployeeServiceImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ public EmployeeBatchUpsertResultDTO upsertEmployeesBatch(List<EmployeeCreateDTO>
9696
if (dto.getProfile() != null) {
9797
EmployeeUpdateDTO.EmployeeProfileUpdateDTO profileUpdateDTO = new EmployeeUpdateDTO.EmployeeProfileUpdateDTO();
9898
BeanUtils.copyProperties(dto.getProfile(), profileUpdateDTO);
99+
// these fields are not set by the CSV file therefore we prevent them from changing the existing employee profile.
100+
profileUpdateDTO.setAuthorities(null);
101+
profileUpdateDTO.setDietTypes(null);
102+
profileUpdateDTO.setNotes(null);
99103
employeeUpdateDTO.setProfile(profileUpdateDTO);
100104
}
101105

backend/src/main/java/com/itestra/eep/sql/postgres-dump.sql

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)