- Timestamp:
- Dec 18, 2018, 10:24:34 AM (5 years ago)
- Branches:
- current, feature/docs, master
- Children:
- d507f75
- Parents:
- 4554843
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ow/views/workout.py
r4554843 r74b9c4d 64 64 Add a workout uploading a tracking file 65 65 """ 66 # if not given a file there is an empty byte in POST, which breaks 67 # our blob storage validator. 68 # dirty fix until formencode fixes its api.is_empty method 69 if isinstance(request.POST.get('tracking_file', None), bytes): 70 request.POST['tracking_file'] = '' 71 66 72 form = Form(request, schema=UploadedWorkoutSchema()) 67 73 … … 129 135 renderer='ow:templates/update_workout_from_file.pt') 130 136 def update_workout_from_file(context, request): 137 # if not given a file there is an empty byte in POST, which breaks 138 # our blob storage validator. 139 # dirty fix until formencode fixes its api.is_empty method 140 if isinstance(request.POST.get('tracking_file', None), bytes): 141 request.POST['tracking_file'] = '' 142 131 143 form = Form(request, schema=UpdateWorkoutSchema()) 132 144 if 'submit' in request.POST and form.validate():
Note: See TracChangeset
for help on using the changeset viewer.