Skip to content

Commit

Permalink
Fixed critical... asbool(config.get...
Browse files Browse the repository at this point in the history
  • Loading branch information
m431m committed Feb 4, 2021
1 parent 4d937d6 commit d7b312c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/restricted/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _send_request_mail(self, data):

# CC doesn't work and mailer cannot send to multiple addresses
for email, name in email_dict.iteritems():
if config.getboolean('ckanext.restricted.enable_send_mail', True):
if asbool(config.get('ckanext.restricted.enable_send_mail', True)):
mailer.mail_recipient(name, email, subject, body, headers)

# Special copy for the user (no links)
Expand All @@ -110,7 +110,7 @@ def _send_request_mail(self, data):
'request mail sent. \n\n >> {}'
).format(body.replace("\n", "\n >> "))

if config.getboolean('ckanext.restricted.enable_send_mail', True):
if asbool(config.get('ckanext.restricted.enable_send_mail', True)):
mailer.mail_recipient(
name, email, 'Fwd: ' + subject, body_user, headers)
success = True
Expand Down

0 comments on commit d7b312c

Please sign in to comment.