|
|
|
@ -716,7 +716,7 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe |
|
|
|
if (!firmware.getType().equals(OtaPackageType.FIRMWARE)) { |
|
|
|
throw new DataValidationException("Can't assign firmware with type: " + firmware.getType()); |
|
|
|
} |
|
|
|
if (firmware.getData() == null) { |
|
|
|
if (firmware.getData() == null && !firmware.hasUrl()) { |
|
|
|
throw new DataValidationException("Can't assign firmware with empty data!"); |
|
|
|
} |
|
|
|
if (!firmware.getDeviceProfileId().equals(device.getDeviceProfileId())) { |
|
|
|
|