Private
Public Access
1
0

removing notification for new workout sync, adding CN liked KML api

This commit is contained in:
2024-04-01 11:15:31 +02:00
parent 65f486ac69
commit bfbc642312
9 changed files with 195 additions and 42 deletions

View File

@@ -112,24 +112,27 @@ def send_template_email(from_email, to_email, subject,
else:
emailbounced = False
for recipient in to_email:
try:
soup = BeautifulSoup(html_content)
createmessage = kwargs.get('createmessage', True)
s2 = soup.body
usr = User.objects.get(email=recipient)
umsg = UserMessage(
receiver = usr.rower,
datetime = timezone.now(),
text = '{text}'.format(text=s2),
subject=subject,
)
umsg.save()
except User.DoesNotExist:
pass
except Exception as e:
pass
if createmessage:
for recipient in to_email:
try:
soup = BeautifulSoup(html_content)
s2 = soup.body
usr = User.objects.get(email=recipient)
umsg = UserMessage(
receiver = usr.rower,
datetime = timezone.now(),
text = '{text}'.format(text=s2),
subject=subject,
)
umsg.save()
except User.DoesNotExist:
pass
except Exception as e:
pass
if not emailbounced:
res = msg.send()
@@ -152,7 +155,7 @@ def send_confirm(user, name, link, options): # pragma: no cover
_ = send_template_email('Rowsandall <info@rowsandall.com>',
[fullemail],
subject, 'confirmemail.html',
d
d, createmessage=False
)
return 1