2
0
Fork 0

Convert phone number to string and fix typos

This commit is contained in:
Luca 2022-04-29 02:36:32 +02:00
parent afce72c427
commit f5adc0064e
2 changed files with 2 additions and 3 deletions

View File

@ -118,8 +118,7 @@ class LoginToken(models.Model):
send_count = models.IntegerField(default=0)
def send(self):
text = f"Dein Registrierungslink zum Helfer*inensystem: https://kontakt.rocks/{self.get_absolute_url()} \nWenn du dich nicht registiert hast, ignoriere diese SMS."
print("msglen", len(text))
text = f"Dein Registrierungslink zum Helfer*innensystem: https://kontakt.rocks{self.get_absolute_url()}\nWenn du dich nicht registriert hast, ignoriere diese SMS."
msg = Message(to=self.helper, text=text)
msg.save()
self.sent_at = timezone.now()

View File

@ -18,7 +18,7 @@ def send(msg):
print(f"would send message to {msg.to.phone}\n---\n{msg.text}")
return
send_sms(msg.to.phone, msg.text)
send_sms(str(msg.to.phone), msg.text)
# cron task to send normal messages(reminders,changes) in batches