Commit d0287b31 authored by Michal Čihař's avatar Michal Čihař

Make unit based links work

parent 89378a86
......@@ -409,6 +409,13 @@ def translate(request, project, subproject, lang):
return response
# Grab actual unit
if 'checksum' in request.GET:
try:
unit = obj.unit_set.get(checksum=request.GET['checksum'])
except Unit.DoesNotExist:
unit = None
if unit is None:
try:
unit = obj.unit_set.get(pk=search_result['ids'][offset])
except Unit.DoesNotExist:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment