Add temporary log to check if code is in use

In response to: [^1].

[^1]: https://github.com/alphagov/notifications-api/pull/3493#discussion_r838477599
This commit is contained in:
Ben Thorner
2022-03-30 13:36:10 +01:00
parent 7d92a0869a
commit e6fffc00da

View File

@@ -40,6 +40,14 @@ class SmsClient(Client):
def send_sms(self, to, content, reference, international, sender):
start_time = monotonic()
if sender is None:
# temporary log to see if the following ternary is necessary
# or if it's safe to remove it - keep for 1-2 weeks
self.current_app.logger.warning(
f"send_sms called with 'sender' of 'None' for {reference}"
)
sender = self.from_number if sender is None else sender
try: