fixed unicodedecode error in workout split
This commit is contained in:
@@ -133,8 +133,7 @@
|
|||||||
</td>
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>
|
<td>
|
||||||
<a href={% url rower.defaultlandingpage
|
<a href={% url rower.defaultlandingpage id=workout.id %}>No Name
|
||||||
id=workout.id %}>No Name
|
|
||||||
</a></td>
|
</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
@@ -10176,7 +10176,13 @@ def workout_split_view(request,id=id):
|
|||||||
else:
|
else:
|
||||||
url = reverse(workouts_view)
|
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)
|
url+='?'+urllib.urlencode(qdict)
|
||||||
|
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|||||||
Reference in New Issue
Block a user