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

Better name for method running checks

This also avoids name clash with Model method in Django 1.7.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 398ff02a
......@@ -50,7 +50,7 @@ class ProjectAdmin(admin.ModelAdmin):
translation__subproject__project__in=queryset
)
for unit in units.iterator():
unit.check()
unit.run_checks()
cnt += 1
self.message_user(request, "Updated checks for %d units." % cnt)
......@@ -90,7 +90,7 @@ class SubProjectAdmin(admin.ModelAdmin):
translation__subproject__in=queryset
)
for unit in units.iterator():
unit.check()
unit.run_checks()
cnt += 1
self.message_user(
request,
......
......@@ -29,4 +29,4 @@ class Command(WeblateLangCommand):
# Invoke check for every unit
for unit in units.iterator():
unit.check()
unit.run_checks()
......@@ -456,7 +456,7 @@ class Translation(models.Model, URLMixin, PercentMixin):
# There are other units as well, but some checks
# (eg. consistency) needs update now
for unit in units:
unit.check()
unit.run_checks()
continue
# Last unit referencing to these checks
......
......@@ -673,7 +673,7 @@ class Unit(models.Model):
# Update checks if content or fuzzy flag has changed
if not same_content or not same_state:
self.check(same_state, same_content, force_insert)
self.run_checks(same_state, same_content, force_insert)
# Update fulltext index if content has changed or this is a new unit
if force_insert or not same_content:
......@@ -853,7 +853,7 @@ class Unit(models.Model):
return checks_to_run, cleanup_checks
def check(self, same_state=True, same_content=True, is_new=False):
def run_checks(self, same_state=True, same_content=True, is_new=False):
"""
Updates checks for this unit.
"""
......
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