fixed unicodedecode error in workout split
This commit is contained in:
@@ -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 %}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user