Commit d7999f21 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

astakos: Convert list-like settings to tuple

Settings ADMINS, MANAGERS, and HELPDESK are tuples even though they could
naturally be lists. If one sets by mistake one of these to list, this
triggers an error in notification code, which tries to concatenate them:
concatenation of list and tuple fails. To avoid this, we make sure that
these settings are in tuple form.

Also explicitly set MANAGERS and HELPDESK in the default admin settings
to an empty tuple rather than referring to ADMINS (which is an empty
tuple, too).
parent 4d493d62
......@@ -15,9 +15,9 @@ INVITATIONS_PER_LEVEL = getattr(settings, 'ASTAKOS_INVITATIONS_PER_LEVEL', {
4: 0
})
ADMINS = getattr(settings, 'ADMINS', ())
MANAGERS = getattr(settings, 'MANAGERS', ADMINS)
HELPDESK = getattr(settings, 'HELPDESK', ADMINS)
ADMINS = tuple(getattr(settings, 'ADMINS', ()))
MANAGERS = tuple(getattr(settings, 'MANAGERS', ()))
HELPDESK = tuple(getattr(settings, 'HELPDESK', ()))
CONTACT_EMAIL = settings.CONTACT_EMAIL
SERVER_EMAIL = settings.SERVER_EMAIL
......
......@@ -10,11 +10,15 @@
#)
#
# List of people to receive user feedback notifications.
#HELPDESK = ADMINS
#HELPDESK = (
# ('Your Name', 'your_email@domain.com'),
#)
#
# A list of people to receive email notifications on some application events
# (e.g. account creation/activation).
#MANAGERS = ADMINS
#MANAGERS = (
# ('Your Name', 'your_email@domain.com'),
#)
#
## Email configuration
#EMAIL_HOST = "127.0.0.1"
......
......@@ -10,11 +10,15 @@ ADMINS = (
)
# List of people to receive user feedback notifications.
HELPDESK = ADMINS
HELPDESK = (
# ('Your Name', 'your_email@domain.com'),
)
# A list of people to receive email notifications on some application events
# (e.g. account creation/activation).
MANAGERS = ADMINS
MANAGERS = (
# ('Your Name', 'your_email@domain.com'),
)
# Email configuration
EMAIL_HOST = "127.0.0.1"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment