removing debug messgs
This commit is contained in:
@@ -97,7 +97,7 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False):
|
|||||||
try:
|
try:
|
||||||
print("Stravaid ",uploadoptions['stravaid'])
|
print("Stravaid ",uploadoptions['stravaid'])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print("no Strava ID")
|
pass
|
||||||
|
|
||||||
|
|
||||||
url = settings.UPLOAD_SERVICE_URL
|
url = settings.UPLOAD_SERVICE_URL
|
||||||
@@ -107,7 +107,6 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False):
|
|||||||
response_json = response.json()
|
response_json = response.json()
|
||||||
workoutid = [int(response_json['id'])]
|
workoutid = [int(response_json['id'])]
|
||||||
else:
|
else:
|
||||||
print(response.status_code,response.json())
|
|
||||||
workoutid = [0]
|
workoutid = [0]
|
||||||
|
|
||||||
# this is ugly and needs to be done better
|
# this is ugly and needs to be done better
|
||||||
|
|||||||
@@ -4406,7 +4406,6 @@ def workout_upload_api(request):
|
|||||||
except (KeyError,JSONDecodeError):
|
except (KeyError,JSONDecodeError):
|
||||||
post_data = request.POST
|
post_data = request.POST
|
||||||
|
|
||||||
print(post_data)
|
|
||||||
|
|
||||||
# only allow local host
|
# only allow local host
|
||||||
hostt = request.get_host().split(':')
|
hostt = request.get_host().split(':')
|
||||||
@@ -4447,7 +4446,6 @@ def workout_upload_api(request):
|
|||||||
try:
|
try:
|
||||||
stravaid = post_data['stravaid']
|
stravaid = post_data['stravaid']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print(post_data)
|
|
||||||
stravaid = ''
|
stravaid = ''
|
||||||
|
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
@@ -4501,9 +4499,7 @@ def workout_upload_api(request):
|
|||||||
|
|
||||||
w = Workout.objects.get(id=id)
|
w = Workout.objects.get(id=id)
|
||||||
if len(stravaid)>0:
|
if len(stravaid)>0:
|
||||||
print('setting Strava id',stravaid)
|
|
||||||
w.uploadedtostrava = stravaid
|
w.uploadedtostrava = stravaid
|
||||||
print(w,w.id,w.user)
|
|
||||||
w.save()
|
w.save()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user