mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
remove try catch block in availabile check
This commit is contained in:
parent
a5e2e030c2
commit
91077e7da0
1 changed files with 6 additions and 8 deletions
|
@ -67,14 +67,12 @@ def check_domain_available(domain):
|
|||
a match.
|
||||
"""
|
||||
Domain = apps.get_model("registrar.Domain")
|
||||
try:
|
||||
if domain.endswith(".gov"):
|
||||
return Domain.available(domain)
|
||||
else:
|
||||
# domain search string doesn't end with .gov, add it on here
|
||||
return Domain.available(domain + ".gov")
|
||||
except Exception as err:
|
||||
raise err
|
||||
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue