mirror of https://git.48k.eu/ogcp
views: Check form contain a cache partition
Make the partition and format form fail if the user has not added a cache partition. A cache partition is required to make the restoration of images workmaster
parent
cc5c0105db
commit
c1548fd219
|
@ -557,6 +557,14 @@ def action_setup_show():
|
|||
def action_setup_modify():
|
||||
form = SetupForm(request.form)
|
||||
if form.validate():
|
||||
has_cache=False
|
||||
for partition in form.partitions:
|
||||
if partition.part_type.data == 'CACHE':
|
||||
has_cache=True
|
||||
if not has_cache:
|
||||
flash(_(f'Missing cache partition'), category='error')
|
||||
return redirect(url_for('commands'))
|
||||
|
||||
ips = form.ips.data.split(' ')
|
||||
|
||||
payload = {'clients': ips,
|
||||
|
|
Loading…
Reference in New Issue