mirror of https://git.48k.eu/ogcp
views: fix center/update validation with no selection
Check no center selection before missing server data. Lack of checkbox selection will not carry server data as server information is defined based on the components selected. Report no center selection instead of lack server data in that case.master
parent
509d0e8dcf
commit
c0440eba51
|
@ -2130,13 +2130,13 @@ def action_center_update():
|
|||
params = request.args.to_dict()
|
||||
server = params.get('scope-server')
|
||||
center = params.get('scope-center')
|
||||
if not center:
|
||||
flash(_('Please, select one center'), category='error')
|
||||
return redirect(url_for("scopes"))
|
||||
if not server:
|
||||
flash(_('Internal error: server was not sent as request argument'),
|
||||
category='error')
|
||||
return redirect(url_for("scopes"))
|
||||
if not center:
|
||||
flash(_('Please, select one center'), category='error')
|
||||
return redirect(url_for("scopes"))
|
||||
|
||||
server = get_server_from_ip_port(server)
|
||||
|
||||
|
|
Loading…
Reference in New Issue