mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
e2e tests pass locally
This commit is contained in:
@@ -13,7 +13,9 @@ def is_api_down():
|
||||
response = requests.get(api_base_url, timeout=2)
|
||||
is_down = response.status_code != 200
|
||||
if is_down:
|
||||
logger.warning(f"API responded with status {response.status_code} at {api_base_url}")
|
||||
logger.warning(
|
||||
f"API responded with status {response.status_code} at {api_base_url}"
|
||||
)
|
||||
return is_down
|
||||
except RequestException as e:
|
||||
logger.error(f"API down when loading homepage {e}")
|
||||
|
||||
@@ -198,6 +198,7 @@ def convert_report_date_to_preferred_timezone(db_date_str_in_utc):
|
||||
|
||||
def get_user_preferred_timezone():
|
||||
if current_user and hasattr(current_user, "preferred_timezone"):
|
||||
return current_user.preferred_timezone
|
||||
|
||||
tz = current_user.preferred_timezone
|
||||
if tz in pytz.all_timezones:
|
||||
return tz
|
||||
return "US/Eastern"
|
||||
|
||||
Reference in New Issue
Block a user