Fix error on import

This commit is contained in:
Andrii Landiak 2025-06-20 15:54:01 +03:00
parent b76909ce05
commit d6f18dc851
2 changed files with 6 additions and 1 deletions

View File

@ -63,7 +63,7 @@ public class OtaPackageImportService extends BaseEntityImportService<OtaPackageI
protected OtaPackage saveOrUpdate(EntitiesImportCtx ctx, OtaPackage otaPackage, OtaPackageExportData exportData, IdProvider idProvider, CompareResult compareResult) {
if (otaPackage.hasUrl()) {
OtaPackageInfo info = new OtaPackageInfo(otaPackage);
return (OtaPackage) otaPackageService.saveOtaPackageInfo(info, info.hasUrl());
return new OtaPackage(otaPackageService.saveOtaPackageInfo(info, info.hasUrl()));
}
return otaPackageService.saveOtaPackage(otaPackage);
}

View File

@ -47,4 +47,9 @@ public class OtaPackage extends OtaPackageInfo {
this.data = otaPackage.getData();
}
public OtaPackage(OtaPackageInfo otaPackageInfo) {
super(otaPackageInfo);
this.data = null;
}
}