mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-03 09:43:33 +02:00
Fix logic after pulling from latest
This commit is contained in:
parent
1053efc68c
commit
74927fd1f7
4 changed files with 11 additions and 3 deletions
|
@ -53,7 +53,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if portfolio %}
|
{% if is_org_user %}
|
||||||
{% comment %} TODO - uncomment in #2352 and add to edit_link
|
{% comment %} TODO - uncomment in #2352 and add to edit_link
|
||||||
{% url 'domain-suborganization' pk=domain.id as url %}
|
{% url 'domain-suborganization' pk=domain.id as url %}
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{% include "includes/domain_sidenav_item.html" with item_text="Domain overview" %}
|
{% include "includes/domain_sidenav_item.html" with item_text="Domain overview" %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
{% if portfolio %}
|
{% if is_org_user %}
|
||||||
{% comment %} TODO - uncomment in #2352
|
{% comment %} TODO - uncomment in #2352
|
||||||
{% with url_name="domain-suborganization" %}
|
{% with url_name="domain-suborganization" %}
|
||||||
{% include "includes/domain_sidenav_item.html" with item_text="Suborganization" %}
|
{% include "includes/domain_sidenav_item.html" with item_text="Suborganization" %}
|
||||||
|
|
|
@ -143,7 +143,7 @@
|
||||||
<th data-sortable="expiration_date" scope="col" role="columnheader">Expires</th>
|
<th data-sortable="expiration_date" scope="col" role="columnheader">Expires</th>
|
||||||
<th data-sortable="state_display" scope="col" role="columnheader">Status</th>
|
<th data-sortable="state_display" scope="col" role="columnheader">Status</th>
|
||||||
<!-- Use portfolio_base_permission when merging into 2366 then delete this comment -->
|
<!-- 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>
|
<th data-sortable="suborganization" scope="col" role="columnheader">Suborganization</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th
|
<th
|
||||||
|
|
|
@ -1112,10 +1112,18 @@ class TestDomainSeniorOfficial(TestDomainOverview):
|
||||||
# Add a portfolio to the current domain
|
# Add a portfolio to the current domain
|
||||||
portfolio = Portfolio.objects.create(creator=self.user, organization_name="Ice Cream")
|
portfolio = Portfolio.objects.create(creator=self.user, organization_name="Ice Cream")
|
||||||
Suborganization.objects.create(portfolio=portfolio, name="Vanilla")
|
Suborganization.objects.create(portfolio=portfolio, name="Vanilla")
|
||||||
|
|
||||||
|
# Add the portfolio to the domain_information object
|
||||||
self.domain_information.portfolio = portfolio
|
self.domain_information.portfolio = portfolio
|
||||||
self.domain_information.save()
|
self.domain_information.save()
|
||||||
self.domain_information.refresh_from_db()
|
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
|
# Add a SO to the portfolio
|
||||||
senior_official = SeniorOfficial.objects.create(first_name="Bob", last_name="Unoriginal")
|
senior_official = SeniorOfficial.objects.create(first_name="Bob", last_name="Unoriginal")
|
||||||
portfolio.senior_official = senior_official
|
portfolio.senior_official = senior_official
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue