Commit 91a4f3fd authored by Anastasiia Gelmut's avatar Anastasiia Gelmut
Browse files

GONRG-1537 Fixed Integration Test

parent e3e35387
......@@ -98,10 +98,15 @@ public class PartitionServiceImpl implements IPartitionService {
@Transactional
@Override
public PartitionInfo updatePartition(String partitionId, PartitionInfo partitionInfo) {
if(partitionInfo.getProperties().containsKey("id")) {
throw new AppException(HttpStatus.SC_BAD_REQUEST, "can not update id", "the field id can not be updated");
}
if (!this.partitionPropertyEntityRepository.findByPartitionId(partitionId).isPresent()) {
throw new AppException(HttpStatus.SC_NOT_FOUND, UNKNOWN_ERROR_REASON,
"An attempt to update not existing partition.");
}
List<PartitionPropertyEntity> partitionProperties = new ArrayList<>();
for (Map.Entry<String, Property> entry : partitionInfo.getProperties().entrySet()) {
PartitionPropertyEntity entity = this.partitionPropertyEntityRepository
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment