mirror of https://git.48k.eu/ogcp
views: ignore image datasize check if datasize is zero
Check the restored image fits in the target partition only if the datasize value is not zero. Proceed with the check before the image/restore request otherwise.master
parent
e9a9ec467e
commit
3c4b917280
|
@ -781,7 +781,7 @@ def action_image_restore():
|
|||
|
||||
image_datasize = int(image['datasize'])
|
||||
part_size = int(part_size) * 1024
|
||||
if image_datasize > part_size:
|
||||
if image_datasize and image_datasize > part_size:
|
||||
flash(_(f'The image size is bigger than the target partition'), category='error')
|
||||
return redirect(url_for('commands'))
|
||||
|
||||
|
|
Loading…
Reference in New Issue