Convert phone number to string and fix typos

pull/1/head
Luca 3 years ago
parent afce72c427
commit f5adc0064e

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

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

Loading…
Cancel
Save