From d993107f1a2ab92056896f40a774d6282b3e6da2 Mon Sep 17 00:00:00 2001 From: Michael Olund Date: Fri, 20 Nov 2020 14:24:04 -0800 Subject: [PATCH] Add Vancouver to the location list even if the API fails --- edivorce/apps/core/utils/efiling_court_locations.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/edivorce/apps/core/utils/efiling_court_locations.py b/edivorce/apps/core/utils/efiling_court_locations.py index a4915c28..394212dd 100644 --- a/edivorce/apps/core/utils/efiling_court_locations.py +++ b/edivorce/apps/core/utils/efiling_court_locations.py @@ -74,6 +74,12 @@ class EFilingCourtLocations(EFilingHubCallerBase): if response.status_code == 401: print(response.headers.get('WWW-Authenticate', '')) - return {"Error calling court locations API": {"status_code": "401", "text": "authentication failed"}} - - return {"Error calling court locations API": {"status_code": str(response.status_code), "text": response.text}} + return { + "Error calling court locations API": {"status_code": "401", "text": "authentication failed"}, + "Vancouver": {"address_1": "API Error", "postal": "APIERR", "location_id": "6011"} + } + + return { + "Error calling court locations API": {"status_code": str(response.status_code), "text": response.text}, + "Vancouver": {"address_1": "API Error", "postal": "APIERR", "location_id": "6011"} + }