From c66871f3ce01aafb9e94f3ed2ca72811a464f5c5 Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Tue, 12 Dec 2023 10:39:52 +0100 Subject: 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. --- ogcp/views.py | 4 ++-- 1 file 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')]}") -- cgit v1.2.3-18-g5258