Fix logic after pulling from latest

This commit is contained in:
zandercymatics 2024-07-26 11:04:57 -06:00
parent 1053efc68c
commit 74927fd1f7
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 11 additions and 3 deletions

View file

@ -53,7 +53,7 @@
{% endif %}
{% endif %}
{% if portfolio %}
{% if is_org_user %}
{% comment %} TODO - uncomment in #2352 and add to edit_link
{% url 'domain-suborganization' pk=domain.id as url %}
{% endcomment %}

View file

@ -8,7 +8,7 @@
{% include "includes/domain_sidenav_item.html" with item_text="Domain overview" %}
{% endwith %}
{% if portfolio %}
{% if is_org_user %}
{% comment %} TODO - uncomment in #2352
{% with url_name="domain-suborganization" %}
{% include "includes/domain_sidenav_item.html" with item_text="Suborganization" %}

View file

@ -143,7 +143,7 @@
<th data-sortable="expiration_date" scope="col" role="columnheader">Expires</th>
<th data-sortable="state_display" scope="col" role="columnheader">Status</th>
<!-- Use portfolio_base_permission when merging into 2366 then delete this comment -->
{% if portfolio %}
{% if is_org_user %}
<th data-sortable="suborganization" scope="col" role="columnheader">Suborganization</th>
{% endif %}
<th

View file

@ -1112,10 +1112,18 @@ class TestDomainSeniorOfficial(TestDomainOverview):
# Add a portfolio to the current domain
portfolio = Portfolio.objects.create(creator=self.user, organization_name="Ice Cream")
Suborganization.objects.create(portfolio=portfolio, name="Vanilla")
# Add the portfolio to the domain_information object
self.domain_information.portfolio = portfolio
self.domain_information.save()
self.domain_information.refresh_from_db()
# Add portfolio perms to the user object
self.user.portfolio = portfolio
self.user.portfolio_additional_permissions = [User.UserPortfolioPermissionChoices.VIEW_PORTFOLIO]
self.user.save()
self.user.refresh_from_db()
# Add a SO to the portfolio
senior_official = SeniorOfficial.objects.create(first_name="Bob", last_name="Unoriginal")
portfolio.senior_official = senior_official