Skip to content

Commit

Permalink
fix: do not maintain translation memory for bots
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jan 29, 2025
1 parent db4783a commit 80f46a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion weblate/trans/models/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 80f46a3

Please sign in to comment.