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.
master
Javier Hernandez 2023-12-12 10:39:52 +01:00 committed by OpenGnSys Support Team
parent c1548fd219
commit c66871f3ce
1 changed files with 2 additions and 2 deletions

View File

@ -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')]}")