mirror of https://git.48k.eu/ogcp
views: Prevent zero or negative size partitions
Defining a partition size <1 causes the partition to show with a different configuration to the one configured in the form. Any <1 size partition shows as Linux, Empty and the size field without value. Validate the form so we refuse any partition with size <1.master
parent
4c97b671aa
commit
acd6d20eeb
|
@ -653,6 +653,10 @@ def action_setup_modify():
|
|||
flash(_('The EFI partition requires a FAT32 filesystem'), category='error')
|
||||
return redirect(url_for('commands'))
|
||||
|
||||
if partition.size.data <= 0:
|
||||
flash(_('Partitions can\'t have a size of zero or lower'), category='error')
|
||||
return redirect(url_for('commands'))
|
||||
|
||||
if cache_count == 0:
|
||||
flash(_(f'Missing cache partition'), category='error')
|
||||
return redirect(url_for('commands'))
|
||||
|
|
Loading…
Reference in New Issue