diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-06-18 12:43:46 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-06-18 12:43:46 +0200 |
commit | 3c4b91728053e242eb13a04a3c13074033c493f5 (patch) | |
tree | c26bb367bf07cfb1e6859d3912c527404463ec39 | |
parent | e9a9ec467ead7bcc56bbb3e19ec2a17d5a3737d0 (diff) |
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.
-rw-r--r-- | ogcp/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index d022d04..abcc0a7 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -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')) |