From 80f46a38c2d6f7938d3cf6ebc6d3656c09b2c4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <michal@cihar.com> Date: Wed, 29 Jan 2025 13:50:03 +0100 Subject: [PATCH] fix: do not maintain translation memory for bots --- weblate/trans/models/unit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/weblate/trans/models/unit.py b/weblate/trans/models/unit.py index 38a05d338895..ed9cd0c6ebf3 100644 --- a/weblate/trans/models/unit.py +++ b/weblate/trans/models/unit.py @@ -1624,7 +1624,12 @@ def translate( self.state = self.original_state = STATE_FUZZY self.save(run_checks=False, same_content=True, update_fields=["state"]) - if user and self.target != self.old_unit["target"]: + if ( + user + and not user.is_bot + and user.is_active + and self.target != self.old_unit["target"] + ): self.update_translation_memory(user) if change_action == Change.ACTION_AUTO: