Commit eba0a7f6 authored by Sandro Knauß's avatar Sandro Knauß
Browse files

[Weblate] save-suggestions: don't import *

* Use models.Components instead of Components
* need for explicit import os
* use enumerate, as it a way simply and less error prune
parent 96b60a53
......@@ -10,7 +10,7 @@
import logging
import logging.config
import os
import subprocess
import sys
......@@ -21,7 +21,7 @@ os.environ["DJANGO_IS_MANAGEMENT_COMMAND"] = "1"
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
from weblate.trans.models import *
from weblate.trans import models
TMPDIR = "/var/lib/weblate/repositories/vcs/staging/"
......@@ -72,12 +72,10 @@ def commandline():
raise"Start search for suggestions.")
len_subprojects = len(Component.objects.all())
subprojects = list(Component.objects.all())
subprojects = models.Component.objects.all()
for i in range(len_subprojects):
subproject = subprojects[i]
for i, subproject in enumerate(subprojects):
for translation in subproject.translation_set.all():
changed = False
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