summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-26 14:49:18 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-26 14:49:18 +0200
commitd6a896628f1e196acb4479e3ab55655c4f4c1008 (patch)
tree21c387504d04f20da103fe6d169b0b365dedf9bc /ogcp
parent6feffeab5ddc1c8ba903a08015c8f36566d1eb30 (diff)
views: rename reference partitions variable in /image/restore
Rename part_choices variable to reference_patitioning to improve readability and intent in the code that checks the uniformity of the client's partitions.
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/views.py10
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} "