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

Fixed fuzzy flag handling for monolingual files

The backend does not have to be saved for changing the flag as we track
it only internally.

Fixes #300
parent d27e0eee
......@@ -628,8 +628,13 @@ class Unit(models.Model):
self.translation.update_from_blob(True)
return False
# Get old unit from database (for notifications)
oldunit = Unit.objects.get(id=self.id)
# Return if there was no change
if not saved:
# We have to explicitly check for fuzzy flag change on monolingual
# files, where we handle it ourselves without storing to backend
if not saved and oldunit.fuzzy == self.fuzzy:
# Propagate if we should
if propagate:
self.propagate(request, change_action)
......@@ -642,9 +647,6 @@ class Unit(models.Model):
# removed)
self.flags = pounit.get_flags()
# Get old unit from database (for notifications)
oldunit = Unit.objects.get(id=self.id)
# Save updated unit to database
self.save(backend=True)
......
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