diff options
-rw-r--r-- | ogcp/views.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index 7c50ac9..6ad9918 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -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, |