Skip to content

Commit

Permalink
fix: hotfix 3.13.7 notify admins about errors (#235)
Browse files Browse the repository at this point in the history
Co-authored-by: hicham <hicham.taroq-ext@aphp.fr>
  • Loading branch information
thicham43 and hicham authored Aug 2, 2023
1 parent 3696b9b commit 2e82e7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin_cohort/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'Portail/Cohort360 API'
__version__ = '3.13.6'
__version__ = '3.13.7'
__author__ = 'Assistance Publique - Hopitaux de Paris, Département I&D'


Expand Down
3 changes: 2 additions & 1 deletion admin_cohort/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
SESSION_COOKIE_SECURE = not DEBUG

ADMINS = [a.split(',') for a in env("ADMINS").split(';')]
NOTIFY_ADMINS = bool(env("NOTIFY_ADMINS", default=False))

logging.captureWarnings(True)

Expand All @@ -59,7 +60,7 @@
},
'django.request': {
'level': "ERROR",
'handlers': ['error_handler', 'mail_admins'],
'handlers': ['error_handler'] + (NOTIFY_ADMINS and ['mail_admins'] or []),
'propagate': False
}},
handlers={
Expand Down

0 comments on commit 2e82e7a

Please sign in to comment.