Skip to content

Instantly share code, notes, and snippets.

@mathjazz
Last active August 30, 2017 07:35
Show Gist options
  • Select an option

  • Save mathjazz/0bc892d6726715fc354ecfd41cf61ce9 to your computer and use it in GitHub Desktop.

Select an option

Save mathjazz/0bc892d6726715fc354ecfd41cf61ce9 to your computer and use it in GitHub Desktop.
diff --git a/pontoon/sync/tasks.py b/pontoon/sync/tasks.py
index 5ac9c2d..77c2243 100644
--- a/pontoon/sync/tasks.py
+++ b/pontoon/sync/tasks.py
@@ -249,10 +249,10 @@ def sync_translations(
updated_entity_pks.append(db_entity.pk)
obsolete_entity_pks = project_changes['obsolete_db']
- changed_resources = db_project.resources.filter(
+ changed_resources = list(db_project.resources.filter(
Q(entities__date_created=now) |
Q(entities__pk__in=updated_entity_pks + obsolete_entity_pks)
- ).distinct()
+ ).distinct())
obsolete_vcs_entities = project_changes['obsolete_db']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment