From 1adaab8955ccf022b1c22b23d62a383854eb0e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9lestin=20Matte?= Date: Thu, 9 Sep 2021 16:50:30 +0200 Subject: [PATCH] Fix "push changes" crash in CommunityAuthSiteAdminForm --- pgweb/account/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgweb/account/admin.py b/pgweb/account/admin.py index d4a3bd04..7e0e747a 100644 --- a/pgweb/account/admin.py +++ b/pgweb/account/admin.py @@ -34,7 +34,7 @@ class CommunityAuthSiteAdminForm(forms.ModelForm): def clean(self): d = super().clean() - if d.get('push_changes', False) and not d['apiurl']: + if d.get('push_changes', False) and not d.get('apiurl', ''): self.add_error('push_changes', 'API url must be specified to enable push changes!') if d.get('push_ssh', False) and not d.get('push_changes', False):