Linting cleanup

This commit is contained in:
zandercymatics 2024-08-05 12:23:49 -06:00
parent c109d383c0
commit 9c800e1f1d
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 4 additions and 5 deletions

View file

@ -273,7 +273,7 @@ class User(AbstractUser):
# Field specific permission checks
def has_view_suborganization(self):
return self._has_portfolio_permission(UserPortfolioPermissionChoices.VIEW_SUBORGANIZATION)
def has_edit_suborganization(self):
return self._has_portfolio_permission(UserPortfolioPermissionChoices.EDIT_SUBORGANIZATION)

View file

@ -152,7 +152,7 @@ def in_path(url, path):
return url in path
@register.filter(name='and')
@register.filter(name="and")
def and_filter(value, arg):
"""
Implements logical AND operation in templates.

View file

@ -1643,7 +1643,7 @@ class TestDomainSuborganization(TestDomainOverview):
# Create a portfolio and two suborgs
portfolio = Portfolio.objects.create(creator=self.user, organization_name="Ice Cream")
suborg = Suborganization.objects.create(portfolio=portfolio, name="Vanilla")
suborg_2 = Suborganization.objects.create(portfolio=portfolio, name="Chocolate")
Suborganization.objects.create(portfolio=portfolio, name="Chocolate")
# Create an unrelated portfolio
unrelated_portfolio = Portfolio.objects.create(creator=self.user, organization_name="Fruit")
@ -1676,8 +1676,7 @@ class TestDomainSuborganization(TestDomainOverview):
self.assertNotContains(page, "Save")
self.assertContains(
page,
"The suborganization for this domain can only be updated by a organization administrator."
page, "The suborganization for this domain can only be updated by a organization administrator."
)
@less_console_noise_decorator