diff --git a/ogcp/views.py b/ogcp/views.py index 5040bd3..6647c36 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -1199,6 +1199,11 @@ def action_software(): f"| {PART_TYPE_CODES.get(part.get('code'), 'UNKNOWN')} " f"{FS_CODES.get(part.get('filesystem'), 'UNKNOWN')}") ) + + if not form.os.choices: + flash(_(f'No valid partition available'), category='error') + return redirect(url_for('commands')) + return render_template('actions/software.html', form=form, scopes=scopes) @app.route('/action/session', methods=['GET', 'POST'])