#13 fix condition
This commit is contained in:
parent
a0b65f341b
commit
7012c00c5f
@ -87,8 +87,7 @@ public class FileService {
|
|||||||
public List<FileData> saveOrCreate(List<FileDataDto> fileDtos) throws IOException {
|
public List<FileData> saveOrCreate(List<FileDataDto> fileDtos) throws IOException {
|
||||||
List<FileData> files = new ArrayList<>();
|
List<FileData> files = new ArrayList<>();
|
||||||
for (FileDataDto file : fileDtos) {
|
for (FileDataDto file : fileDtos) {
|
||||||
if (file.getId() != null) files.add(update(file));
|
files.add(file.getId() != null ? update(file) : create(file));
|
||||||
else files.add(create(file));
|
|
||||||
}
|
}
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user