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

Define allunits even when doing review

parent 8098a01f
...@@ -729,14 +729,14 @@ def translate(request, project, subproject, lang): ...@@ -729,14 +729,14 @@ def translate(request, project, subproject, lang):
reviewform = ReviewForm(request.GET) reviewform = ReviewForm(request.GET)
if reviewform.is_valid(): if reviewform.is_valid():
units = obj.unit_set.review(reviewform.cleaned_data['date'], request.user) allunits = obj.unit_set.review(reviewform.cleaned_data['date'], request.user)
# Review # Review
if direction == 'stay': if direction == 'stay':
units = units.filter(position = pos) units = allunits.filter(position = pos)
elif direction == 'back': elif direction == 'back':
units = units.filter(position__lt = pos).order_by('-position') units = allunits.filter(position__lt = pos).order_by('-position')
else: else:
units = units.filter(position__gt = pos) units = allunits.filter(position__gt = pos)
elif search_query != '': elif search_query != '':
# Apply search conditions # Apply search conditions
if search_exact: if search_exact:
......
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