mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-28 05:26:28 +02:00
updates in response to PR suggestions
This commit is contained in:
parent
2d1eaf8b18
commit
b5970ecb37
6 changed files with 35 additions and 35 deletions
|
@ -1520,7 +1520,7 @@ class DomainInvitationAdmin(BaseInvitationAdmin):
|
|||
"""
|
||||
if not change:
|
||||
domain = obj.domain
|
||||
domain_org = domain.domain_info.portfolio
|
||||
domain_org = getattr(domain.domain_info, "portfolio", None)
|
||||
requested_email = obj.email
|
||||
# Look up a user with that email
|
||||
requested_user = get_requested_user(requested_email)
|
||||
|
@ -1536,6 +1536,7 @@ class DomainInvitationAdmin(BaseInvitationAdmin):
|
|||
and not flag_is_active(request, "multiple_portfolios")
|
||||
and domain_org is not None
|
||||
and not member_of_this_org
|
||||
and not member_of_a_different_org
|
||||
):
|
||||
send_portfolio_invitation_email(email=requested_email, requestor=requestor, portfolio=domain_org)
|
||||
portfolio_invitation, _ = PortfolioInvitation.objects.get_or_create(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue