Commit 4797417f authored by Michal Čihař's avatar Michal Čihař

Merge pull request #598 from dtschan/rebuild_index

Fix IndexError when no translation subprojects are defined
parents b7946229 ff179990
......@@ -57,6 +57,8 @@ class WeblateCommand(BaseCommand):
Memory effective iteration over units.
"""
units = self.get_units(*args, **options).order_by('pk')
if not units:
return
current = 0
last = units.order_by('-pk')[0].pk
......
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