Skip to content

Commit

Permalink
Always construct new list for filenames
Browse files Browse the repository at this point in the history
This avoids potential issue when get_filenames returns internal list.

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Feb 19, 2019
1 parent f45eb68 commit 5095762
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions weblate/addons/git.py
Expand Up @@ -61,10 +61,9 @@ def get_filenames(self, component):
for origin in [component] + list(component.get_linked_childs()):
for translation in origin.translation_set.all():
code = translation.language.code
if code in languages:
languages[code].extend(translation.store.get_filenames())
else:
languages[code] = translation.store.get_filenames()
if code not in languages:
languages[code] = []
languages[code].extend(translation.store.get_filenames())
return languages

def squash_language(self, component, repository):
Expand Down

0 comments on commit 5095762

Please sign in to comment.