summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-12-12 10:39:52 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-12 11:00:17 +0100
commitc66871f3ce01aafb9e94f3ed2ca72811a464f5c5 (patch)
tree95351111906911e2828fde2353583b22d6132f8c
parentc1548fd21993eb4cdfdbcabc13c5761db935e35f (diff)
Fix bug at create and update image
Fix a bug that made the create and update images actions unusable. The data sent to post was incomplete; partition's 'code' data was missing.
-rw-r--r--ogcp/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 6ad9918..e8c5edf 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -1225,7 +1225,7 @@ def action_image_create():
for part in r.json()['partitions'][1:]:
form.os.choices.append(
- (f"{part.get('disk')} {part.get('partition')}",
+ (f"{part.get('disk')} {part.get('partition')} {part.get('code')}",
f"Disk {part.get('disk')} | Partition {part.get('partition')} "
f"| {PART_TYPE_CODES[part.get('code')]} "
f"{FS_CODES[part.get('filesystem')]}")
@@ -1287,7 +1287,7 @@ def action_image_update():
r = server.get('/client/setup', payload={'client': list(ips)})
for part in r.json()['partitions'][1:]:
form.os.choices.append(
- (f"{part.get('disk')} {part.get('partition')}",
+ (f"{part.get('disk')} {part.get('partition')} {part.get('code')}",
f"Disk {part.get('disk')} | Partition {part.get('partition')} "
f"| {PART_TYPE_CODES[part.get('code')]} "
f"{FS_CODES[part.get('filesystem')]}")