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

Properly catch when accessing old unit

parent a3a0304e
......@@ -146,7 +146,7 @@ def search(translation, request):
try:
unit = allunits.filter(checksum=request.GET['checksum'])[0]
offset = unit_ids.index(unit.id)
except (Unit.DoesNotExist, ValueError):
except (Unit.DoesNotExist, IndexError):
pass
# Remove old search results
......
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