Private
Public Access
1
0

fixing sync wup/cd with icu

This commit is contained in:
2025-03-02 13:42:26 +01:00
parent 02a774bcf8
commit 7ee8836335
6 changed files with 75 additions and 8 deletions

View File

@@ -937,6 +937,7 @@ def intervals_webhook_view(request):
else:
dologging("intervals_webhooks.log",request.body)
data = json.loads(request.body)
print(data)
try:
verificationtoken = data['secret']
except KeyError:

View File

@@ -251,6 +251,7 @@ from rowers.rows import handle_uploaded_file, handle_uploaded_image
from rowers.plannedsessions import *
from rowers.tasks import handle_makeplot, handle_otwsetpower, handle_sendemailtcx, handle_sendemailcsv
from rowers.tasks import (
handle_intervals_updateworkout,
handle_post_workout_api,
handle_sendemail_newftp,
instroke_static,

View File

@@ -4611,6 +4611,12 @@ def workout_edit_view(request, id=0, message="", successmessage=""):
except IntegrityError: # pragma: no cover
pass
if row.uploadedtointervals is not None and row.user.intervals_auto_export:
_ = myqueue(queuehigh,
handle_intervals_updateworkout,
row
)
if ps: # pragma: no cover
add_workouts_plannedsession([row], ps, row.user)
@@ -4629,7 +4635,7 @@ def workout_edit_view(request, id=0, message="", successmessage=""):
r.rowdatetime = startdatetime
r.write_csv(row.csvfilename, gzip=True)
dataprep.update_strokedata(encoder.decode_hex(id), r.df)
successmessage = "Changes saved"
messages.info(request, successmessage)