Private
Public Access
1
0

fixing more fixes

This commit is contained in:
Sander Roosendaal
2020-02-19 17:28:22 +01:00
parent f00d5f4270
commit 4b9e4ee0e1
2 changed files with 4 additions and 3 deletions

View File

@@ -512,7 +512,7 @@ def do_sync(w,options):
upload_to_strava = options['upload_to_Strava']
except KeyError:
upload_to_strava = False
try:
if options['stravaid'] != 0 and options['stravaid'] != '':
w.uploadedtostrava = options['stravaid']

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import hashlib
from shutil import copyfile
from six import iterlists
from rowers.views.statements import *
import rowers.teams as teams
import rowers.mytypes as mytypes
@@ -4405,7 +4405,8 @@ def workout_upload_api(request):
secret = json_data['secret']
post_data = json_data
except (KeyError,JSONDecodeError):
post_data = dict(request.POST.iterlists())
q = request.POST
post_data = {k: q.getlist(k) if len(q.getlist(k))>1 else v for k, v in q.items()}
# only allow local host
hostt = request.get_host().split(':')