Fix "push changes" crash in CommunityAuthSiteAdminForm

This commit is contained in:
Célestin Matte
2021-09-09 16:50:30 +02:00
committed by Magnus Hagander
parent fff748282b
commit 1adaab8955

View File

@ -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):