lint and fix tests

This commit is contained in:
zandercymatics 2025-03-05 10:55:14 -07:00
parent 88e8b2dbeb
commit f4c48b55b4
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 7 additions and 15 deletions

View file

@ -286,7 +286,7 @@ def validate_user_portfolio_permission(user_portfolio_permission):
raise ValidationError(
"This user is already assigned to a portfolio. "
"Based on current waffle flag settings, users cannot be assigned to multiple portfolios.",
code="has_existing_permissions"
code="has_existing_permissions",
)
existing_invitations = PortfolioInvitation.objects.filter(email=user_portfolio_permission.user.email).exclude(
@ -297,7 +297,7 @@ def validate_user_portfolio_permission(user_portfolio_permission):
raise ValidationError(
"This user is already assigned to a portfolio invitation. "
"Based on current waffle flag settings, users cannot be assigned to multiple portfolios.",
code="has_existing_invitations"
code="has_existing_invitations",
)
@ -359,14 +359,14 @@ def validate_portfolio_invitation(portfolio_invitation):
raise ValidationError(
"This user is already assigned to a portfolio. "
"Based on current waffle flag settings, users cannot be assigned to multiple portfolios.",
code="has_existing_permissions"
code="has_existing_permissions",
)
if existing_invitations.exists():
raise ValidationError(
"This user is already assigned to a portfolio invitation. "
"Based on current waffle flag settings, users cannot be assigned to multiple portfolios.",
code="has_existing_invitations"
code="has_existing_invitations",
)