Skip to content

Instantly share code, notes, and snippets.

@jotes
Created April 15, 2016 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jotes/7fe71fe237faf2ce4e9e3eaf3ca6d887 to your computer and use it in GitHub Desktop.
Save jotes/7fe71fe237faf2ce4e9e3eaf3ca6d887 to your computer and use it in GitHub Desktop.
@@ -122,9 +124,11 @@ def sync_project_repo(self, project_pk, repo_pk, project_sync_log_pk, now, obsol
if not no_pull:
pull_changes(db_project)
- locales = repo.locales
if locale:
- locales = [locale]
+ locales = [locale] if locale in repo.locales else []
+ else:
+ locales = repo.locales
+
if len(locales) < 1:
log.warning('Could not sync repo `{0}`, no locales found within.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment