mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-27 21:16:28 +02:00
tests on admin and forms
This commit is contained in:
parent
d27352b599
commit
8326bbbca5
3 changed files with 451 additions and 3 deletions
|
@ -1492,7 +1492,7 @@ class PortfolioInvitationAdmin(ListHeaderAdmin):
|
|||
Emails sent to requested user / email.
|
||||
When exceptions are raised, return without saving model.
|
||||
"""
|
||||
if not change: # Only send email if this is a new PortfolioInvitation(creation)
|
||||
if not change: # Only send email if this is a new PortfolioInvitation (creation)
|
||||
portfolio = obj.portfolio
|
||||
requested_email = obj.email
|
||||
requestor = request.user
|
||||
|
@ -1537,7 +1537,7 @@ class PortfolioInvitationAdmin(ListHeaderAdmin):
|
|||
)
|
||||
|
||||
else:
|
||||
logger.warning("Could not send email invitation (Other Exception)", obj.portfolio, exc_info=True)
|
||||
logger.warning("Could not send email invitation (Other Exception)", exc_info=True)
|
||||
messages.error(request, "Could not send email invitation. Portfolio invitation not saved.")
|
||||
|
||||
def response_add(self, request, obj, post_url_continue=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue