remove try catch block in availabile check

This commit is contained in:
Erin 2023-11-30 11:12:08 -08:00
parent a5e2e030c2
commit 91077e7da0
No known key found for this signature in database
GPG key ID: 1CAD275313C62460

View file

@ -67,14 +67,12 @@ def check_domain_available(domain):
a match. a match.
""" """
Domain = apps.get_model("registrar.Domain") Domain = apps.get_model("registrar.Domain")
try:
if domain.endswith(".gov"): if domain.endswith(".gov"):
return Domain.available(domain) return Domain.available(domain)
else: else:
# domain search string doesn't end with .gov, add it on here # domain search string doesn't end with .gov, add it on here
return Domain.available(domain + ".gov") return Domain.available(domain + ".gov")
except Exception as err:
raise err
@require_http_methods(["GET"]) @require_http_methods(["GET"])