diff options
Diffstat (limited to 'ogcp/views.py')
-rw-r--r-- | ogcp/views.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index c890782..300bb04 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -1080,7 +1080,7 @@ def action_image_restore(): for image in images: form.image.choices.append((image['id'], image['name'])) - part_choices = [] + reference_patitioning = [] empty_clients = [] invalid_part_types = get_invalid_image_partition_types() @@ -1124,9 +1124,9 @@ def action_image_restore(): if empty_clients: continue - if not part_choices: # Use first computer as reference part setup conf - part_choices = [part for part in parts] - elif part_choices != parts: + if not reference_patitioning: # Use first computer as reference part setup conf + reference_patitioning = [part for part in parts] + elif reference_patitioning != parts: flash(_(f'Computers have different partition setup'), category='error') return redirect(url_for('commands')) @@ -1134,7 +1134,7 @@ def action_image_restore(): flash(_(f'The following clients have not partitions: {" ".join(empty_clients)}'), category='error') return redirect(url_for('commands')) - for disk_id, part_id, part_code, filesystem, part_size in part_choices: + for disk_id, part_id, part_code, filesystem, part_size in reference_patitioning: form.partition.choices.append( (f"{disk_id} {part_id} {part_code} {part_size} {has_cache}", f"Disk {disk_id} | Partition {part_id} " |