Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rachidatecs committed Sep 27, 2024
1 parent 8782451 commit 56c53f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/registrar/fixtures/fixtures_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,7 @@ def _get_random_portfolio(cls):
try:
organization_names = [portfolio["organization_name"] for portfolio in PortfolioFixture.PORTFOLIOS]

portfolio_options = Portfolio.objects.filter(
organization_name__in=organization_names
)
portfolio_options = Portfolio.objects.filter(organization_name__in=organization_names)
return random.choice(portfolio_options) if portfolio_options.exists() else None # nosec
except Exception as e:
logger.warning(f"Expected fixture portfolio, did not find it: {e}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def load(cls):

organization_names = [portfolio["organization_name"] for portfolio in PortfolioFixture.PORTFOLIOS]

portfolios = list(
Portfolio.objects.filter(organization_name__in=organization_names)
)
portfolios = list(Portfolio.objects.filter(organization_name__in=organization_names))

if not users:
logger.warning("User fixtures missing.")
Expand Down

0 comments on commit 56c53f6

Please sign in to comment.