Skip to content

Commit

Permalink
Merge pull request #1514 from GSA/notify-api-1513
Browse files Browse the repository at this point in the history
the way we set the sender phone number is very questionable
  • Loading branch information
terrazoon authored Jan 7, 2025
2 parents 9e4e957 + c8a8daf commit c65335a
Showing 1 changed file with 10 additions and 1 deletion.
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 c65335a

Please sign in to comment.