membermatters / MemberMatters

An open source membership, access and payments portal for makerspaces and community groups.
https://membermatters.org
MIT License
40 stars 23 forks source link

Gate Twilio client creation on SMS being enabled #190

Closed rechner closed 1 year ago

rechner commented 1 year ago

Some actions that call this SMS function when SMS is disabled result in this error:

web_1    |   File "/usr/src/app/memberportal/services/sms.py", line 17, in __init__
web_1    |     self.client = Client(self.account_sid, self.auth_token)
web_1    |   File "/usr/local/lib/python3.10/site-packages/twilio/rest/__init__.py", line 58, in __init__
web_1    |     raise TwilioException("Credentials are required to create a TwilioClient")
web_1    | twilio.base.exceptions.TwilioException: Credentials are required to create a TwilioClient
jabelone commented 1 year ago

ahh thanks @rechner! I missed that one :)