summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ogcp/views.py2
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'))