From 0d7778147cd3b4ace472877202a36e23b3aa77eb Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Thu, 16 Jan 2025 20:13:59 +0200 Subject: [PATCH] Do not clear ChangedEntityLocale during a sync with commit=False --- mypy.ini | 6 ++++++ pontoon/sync/core/__init__.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 mypy.ini diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 000000000..442c0f666 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,6 @@ +[mypy] +plugins = + mypy_django_plugin.main + +[mypy.plugins.django-stubs] +django_settings_module = "pontoon.settings" diff --git a/pontoon/sync/core/__init__.py b/pontoon/sync/core/__init__.py index 8f6e9c8b6..5fee65036 100644 --- a/pontoon/sync/core/__init__.py +++ b/pontoon/sync/core/__init__.py @@ -73,8 +73,9 @@ def sync_project( removed_paths, now, ) + if commit: + db_changes.delete() - db_changes.delete() checkouts.source.repo.last_synced_revision = checkouts.source.commit if checkouts.target != checkouts.source: checkouts.target.repo.last_synced_revision = checkouts.target.commit