mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-15 17:17:02 +02:00
linting
This commit is contained in:
parent
493f64e070
commit
e1de3dab68
2 changed files with 6 additions and 4 deletions
|
@ -97,7 +97,9 @@ def available(request, domain=""):
|
||||||
if check_domain_available(domain):
|
if check_domain_available(domain):
|
||||||
return JsonResponse({"available": True, "code": "success", "message": DOMAIN_API_MESSAGES["success"]})
|
return JsonResponse({"available": True, "code": "success", "message": DOMAIN_API_MESSAGES["success"]})
|
||||||
else:
|
else:
|
||||||
return JsonResponse({"available": False, "code": "unavailable", "message": DOMAIN_API_MESSAGES["unavailable"]})
|
return JsonResponse(
|
||||||
|
{"available": False, "code": "unavailable", "message": DOMAIN_API_MESSAGES["unavailable"]}
|
||||||
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
return JsonResponse({"available": False, "code": "error", "message": DOMAIN_API_MESSAGES["error"]})
|
return JsonResponse({"available": False, "code": "error", "message": DOMAIN_API_MESSAGES["error"]})
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,9 @@ class GenericError(Exception):
|
||||||
|
|
||||||
_error_mapping = {
|
_error_mapping = {
|
||||||
GenericErrorCodes.CANNOT_CONTACT_REGISTRY: (
|
GenericErrorCodes.CANNOT_CONTACT_REGISTRY: (
|
||||||
"We’re experiencing a system connection error. Please wait a few minutes "
|
"We’re experiencing a system connection error. Please wait a few minutes "
|
||||||
"and try again. If you continue to receive this error after a few tries, "
|
"and try again. If you continue to receive this error after a few tries, "
|
||||||
"contact help@get.gov."
|
"contact help@get.gov."
|
||||||
),
|
),
|
||||||
GenericErrorCodes.GENERIC_ERROR: ("Value entered was wrong."),
|
GenericErrorCodes.GENERIC_ERROR: ("Value entered was wrong."),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue