From 12f74d5a4dbb429813427639aba52b446fddaadc Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Tue, 11 Jun 2024 10:44:08 +0200 Subject: views: remove duplicated validation errors Remove flash() error messages after validate_elements(). validate_elements() defines error messages for min and max element selection from sidebar. --- ogcp/views.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ogcp/views.py b/ogcp/views.py index 63f57f0..b7552e2 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -1272,7 +1272,6 @@ def action_client_update(): else: ips = parse_elements(request.args.to_dict()) if not validate_elements(ips, max_len=1): - flash(_('Please, select one client'), category='error') return redirect(url_for('scopes')) server = get_server_from_clients(list(ips)) @@ -2983,7 +2982,6 @@ def action_image_delete(): form.ids.data = image_id form.server.data = params['image-server'] if not validate_elements(images, max_len=1): - flash(_('Please select one image to delete'), category='error') return redirect(url_for('images')) return render_template('actions/delete_image.html', form=form, image_name=image_name.split('_', 1)[0], image_id=image_id, -- cgit v1.2.3-18-g5258