mirror of https://git.48k.eu/ogcp
Show warning when formatting clients without disks
If an administrator selects a client without disks and goes to "Partition & Format", ogCP redirects it again to "Commands" and shows a floating message indicating that the client has no disks.async-tree v1.1.2
parent
fc02d891cd
commit
d029df8e84
|
@ -515,6 +515,9 @@ def action_setup_show():
|
|||
base_client = args['selected_client']
|
||||
|
||||
db_partitions = get_client_setup(base_client)
|
||||
if not db_partitions:
|
||||
flash(_('Selected client has no disks'), category='error')
|
||||
return redirect(url_for('commands'))
|
||||
filtered_partitions = [p for p in db_partitions
|
||||
if p.get('disk') == selected_disk]
|
||||
|
||||
|
|
Loading…
Reference in New Issue