Skip to content

Commit

Permalink
do minimalistic fix first
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Kehl committed Jan 6, 2025
1 parent cd13984 commit 628c6eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/delivery/send_to_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _get_verify_code(notification):
recipient = recipient.decode("utf-8")
return recipient

# PUT THE FIX HERE???????

def get_sender_numbers(notification):
possible_senders = dao_get_sms_senders_by_service_id(notification.service_id)
sender_numbers = []
Expand Down
11 changes: 10 additions & 1 deletion app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,16 @@ def get_inbound_number(self):
return self.inbound_number.number

def get_default_sms_sender(self):
default_sms_sender = [x for x in self.service_sms_senders if x.is_default]
# notify-api-1513 let's try a minimalistic fix
# to see if we can get the right numbers back
default_sms_sender = [
x
for x in self.service_sms_senders
if x.is_default and x.service_id == self.id
]
current_app.logger.info(
f"#notify-api-1513 senders for service {self.name} are {self.service_sms_senders}"
)
return default_sms_sender[0].sms_sender

def get_default_reply_to_email_address(self):
Expand Down

0 comments on commit 628c6eb

Please sign in to comment.