Commit d7ce64a6 authored by Michal Čihař's avatar Michal Čihař

Fix updating source

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 8ba8a77f
......@@ -633,8 +633,6 @@ class Unit(models.Model):
same_source = Unit.objects.filter(
translation__subproject=self.translation.subproject,
context=self.context,
).exclude(
id=self.id
)
if not same_source.exists():
return
......@@ -644,7 +642,11 @@ class Unit(models.Model):
source=self.target,
contentsum=calculate_checksum(self.source, self.context),
)
same_source.filter(translated=True).update(
same_source.filter(
translated=True
).exclude(
id=self.id
).update(
translated=False,
fuzzy=True,
previous_source=previous_source,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment