summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 9887d47..2dba569 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -1567,6 +1567,12 @@ def action_client_add():
flash(form.errors, category='error')
return redirect(url_for('scopes'))
+ client_name = form.name.data
+
+ if not client_name:
+ flash(_('Invalid empty client name'), category='error')
+ return redirect(url_for("scopes"))
+
try:
ipaddress.ip_address(form.ip.data)
except ValueError as e: