mirror of https://git.48k.eu/ogcp
views: validate client partitions in /action/software
Redirect the user when /action/software is accessed on a client without valid partitions.master
parent
1cf6fbc49e
commit
35269b31a7
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue