Private
Public Access
1
0

c2 api calls now per own api

This commit is contained in:
Sander Roosendaal
2021-01-18 20:29:43 +01:00
parent 89a5bf777a
commit f42b20222c
4 changed files with 317 additions and 27 deletions

View File

@@ -548,9 +548,22 @@ def do_sync(w,options, quick=False):
pass
try:
upload_to_c2 = options['upload_to_C2']
except KeyError:
upload_to_c2 = False
if ('upload_to_C2' in options and options['upload_to_C2']) or (w.user.c2_auto_export):
try:
if options['c2id'] != 0 and options['c2id'] != '':
w.uploadedtoc2 = options['c2id']
upload_to_c2 = False
w.save()
except KeyError:
pass
if ('upload_to_C2' in options and upload_to_c2) or (w.user.c2_auto_export):
try:
message,id = c2stuff.workout_c2_upload(w.user.user,w,asynchron=True)
except NoTokenError: