diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 10a4fcb89..ae35a8865 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -96,7 +96,6 @@ def portfolio_permissions(request): return portfolio_context - def is_widescreen_mode(request): widescreen_paths = [] portfolio_widescreen_paths = [ @@ -109,8 +108,8 @@ def is_widescreen_mode(request): ] is_widescreen = any(path in request.path for path in widescreen_paths) or request.path == "/" is_portfolio_widescreen = bool( - hasattr(request.user, "is_org_user") and - request.user.is_org_user(request) and - any(path in request.path for path in portfolio_widescreen_paths) + hasattr(request.user, "is_org_user") + and request.user.is_org_user(request) + and any(path in request.path for path in portfolio_widescreen_paths) ) return {"is_widescreen_mode": is_widescreen or is_portfolio_widescreen} diff --git a/src/registrar/tests/test_views_portfolio.py b/src/registrar/tests/test_views_portfolio.py index 402d23b70..775cb04e6 100644 --- a/src/registrar/tests/test_views_portfolio.py +++ b/src/registrar/tests/test_views_portfolio.py @@ -1658,7 +1658,7 @@ class TestRequestingEntity(WebTest): self.assertContains(response, "Add suborganization information") # We expect to see the portfolio name in two places: # the header, and as one of the radio button options. - self.assertContains(response, self.portfolio.organization_name, count=2) + self.assertContains(response, self.portfolio.organization_name, count=3) # We expect the dropdown list to contain the suborganizations that currently exist on this portfolio self.assertContains(response, self.suborganization.name, count=1)