Private
Public Access
1
0

fixed unicodedecode error in workout split

This commit is contained in:
Sander Roosendaal
2018-01-16 15:29:25 +01:00
parent 5c0eeca049
commit da4f2e32dc
2 changed files with 8 additions and 3 deletions

View File

@@ -133,8 +133,7 @@
</td>
{% else %}
<td>
<a href={% url rower.defaultlandingpage
id=workout.id %}>No Name
<a href={% url rower.defaultlandingpage id=workout.id %}>No Name
</a></td>
{% endif %}
{% else %}

View File

@@ -10176,7 +10176,13 @@ def workout_split_view(request,id=id):
else:
url = reverse(workouts_view)
qdict = {'q':row.name}
rowname = row.name
if isinstance(rowname,unicode):
rowname = rowname.encode('utf8')
elif isinstance(rowname, str):
rowname = rowname.decode('utf8')
qdict = {'q':rowname}
url+='?'+urllib.urlencode(qdict)
return HttpResponseRedirect(url)