mirror of
https://github.com/peeringdb/peeringdb.git
synced 2024-05-11 05:55:09 +00:00
fix bug caused by the org affiliationship request without an asn (#598)
This commit is contained in:
@@ -513,7 +513,9 @@ class UserOrgAffiliationRequestInlineForm(baseForms.ModelForm):
|
|||||||
def clean(self):
|
def clean(self):
|
||||||
super(UserOrgAffiliationRequestInlineForm, self).clean()
|
super(UserOrgAffiliationRequestInlineForm, self).clean()
|
||||||
try:
|
try:
|
||||||
rdap_valid = RdapLookup().get_asn(self.cleaned_data.get("asn")).emails
|
asn = self.cleaned_data.get("asn")
|
||||||
|
if asn:
|
||||||
|
rdap_valid = RdapLookup().get_asn(asn).emails
|
||||||
except RdapException as exc:
|
except RdapException as exc:
|
||||||
raise ValidationError({"asn": str(exc)})
|
raise ValidationError({"asn": str(exc)})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user