Skip to content

Commit

Permalink
Merge pull request #34029 from dimagi/mk/3324-update-message
Browse files Browse the repository at this point in the history
Updates message to user when limiting active alerts
  • Loading branch information
mkangia authored Jan 25, 2024
2 parents 0473c03 + 32fd0ba commit 64c26be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion corehq/apps/domain/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def test_limiting_active_alerts(self):
)

messages = list(get_messages(response.wsgi_request))
self.assertEqual(messages[0].message, 'Alert not updated. Only 3 active alerts allowed.')
self.assertEqual(messages[0].message, 'Alert not activated. Only 3 active alerts allowed.')


class TestDeleteDomainAlertView(TestBaseDomainAlertView):
Expand Down
2 changes: 1 addition & 1 deletion corehq/apps/domain/views/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ def _apply_update(request, alert):
command = request.POST.get('command')
if command == "activate":
if Alert.objects.filter(created_by_domain=request.domain, active=True).count() >= MAX_ACTIVE_ALERTS:
messages.error(request, _("Alert not updated. Only 3 active alerts allowed."))
messages.error(request, _("Alert not activated. Only 3 active alerts allowed."))
return

if command in ['activate', 'deactivate']:
Expand Down

0 comments on commit 64c26be

Please sign in to comment.