#13 fix condition

This commit is contained in:
Anton Romanov 2019-03-22 13:52:06 +04:00
parent a0b65f341b
commit 7012c00c5f

View File

@ -87,8 +87,7 @@ public class FileService {
public List<FileData> saveOrCreate(List<FileDataDto> fileDtos) throws IOException {
List<FileData> files = new ArrayList<>();
for (FileDataDto file : fileDtos) {
if (file.getId() != null) files.add(update(file));
else files.add(create(file));
files.add(file.getId() != null ? update(file) : create(file));
}
return files;
}