don't subscribe club reps to csc-general

pull/45/head
Max Erenberg 1 year ago
parent 02598fa3bc
commit fa05c4ad4a
  1. 18
      ceod/transactions/members/AddMemberTransaction.py

@ -96,14 +96,16 @@ class AddMemberTransaction(AbstractTransaction):
logger.warning('send_welcome_message failed:\n' + traceback.format_exc())
yield 'failed_to_send_welcome_message: ' + str(err)
try:
user.subscribe_to_mailing_list(self.new_member_list)
yield 'subscribe_to_mailing_list'
except UserAlreadySubscribedError:
pass
except Exception as err:
logger.warning('subscribe_to_mailing_list failed:\n' + traceback.format_exc())
yield 'failed_to_subscribe_to_mailing_list: ' + str(err)
# don't subscribe club reps to csc-general
if self.terms:
try:
user.subscribe_to_mailing_list(self.new_member_list)
yield 'subscribe_to_mailing_list'
except UserAlreadySubscribedError:
pass
except Exception as err:
logger.warning('subscribe_to_mailing_list failed:\n' + traceback.format_exc())
yield 'failed_to_subscribe_to_mailing_list: ' + str(err)
try:
self.mail_srv.announce_new_user(user, self.finished_operations)

Loading…
Cancel
Save