summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 431e9c1..fcd8412 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -2271,6 +2271,10 @@ def action_repo_update():
return redirect(url_for('manage_repos'))
repo_id = repos.pop()
server_ip_port = params.get('repos-server')
+
+ if not server_ip_port:
+ flash(_('Please, select a server'), category='error')
+ return redirect(url_for('manage_repos'))
server = get_server_from_ip_port(server_ip_port)
try:
repository = get_repository(int(repo_id), server)
@@ -2315,6 +2319,10 @@ def action_repo_delete():
return redirect(url_for('manage_repos'))
repo_id = int(repo_id)
server_ip_port = params.get('repos-server')
+
+ if not server_ip_port:
+ flash(_('Please, select a server'), category='error')
+ return redirect(url_for('manage_repos'))
server = get_server_from_ip_port(server_ip_port)
try:
repository = get_repository(repo_id, server)
@@ -2347,6 +2355,10 @@ def action_repo_info():
return redirect(url_for('manage_repos'))
repo_id = int(repo_id)
server_ip_port = params.get('repos-server')
+
+ if not server_ip_port:
+ flash(_('Please, select a server'), category='error')
+ return redirect(url_for('manage_repos'))
server = get_server_from_ip_port(server_ip_port)
try:
repository = get_repository(repo_id, server)