Fix import of older exported files
This commit is contained in:
parent
39667ef2c9
commit
12cd5baf17
|
@ -3,6 +3,7 @@ package ctbrec.ui.tabs.recorded;
|
|||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import ctbrec.Config;
|
||||
import ctbrec.MigrateModel5_1_2;
|
||||
import ctbrec.Model;
|
||||
import ctbrec.ModelGroup;
|
||||
import ctbrec.image.LocalPortraitStore;
|
||||
|
@ -188,6 +189,7 @@ public class ModelImportExport {
|
|||
List<Model> result = new LinkedList<>();
|
||||
for (int i = 0; i < models.length(); i++) {
|
||||
JSONObject model = models.getJSONObject(i);
|
||||
MigrateModel5_1_2.migrate(model);
|
||||
try {
|
||||
ModelDto dto = mapper.readValue(model.toString(), ModelDto.class);
|
||||
result.add(Mappers.getMapper(ModelMapper.class).toModel(dto));
|
||||
|
|
Loading…
Reference in New Issue