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

Store authorship for all changes (issue #347)

parent 7ca3d9b7
......@@ -566,7 +566,8 @@ class Translation(models.Model, URLMixin, PercentMixin):
Change.objects.create(
translation=self,
action=change,
user=user
user=user,
author=user
)
# Notify subscribed users
......
......@@ -585,7 +585,8 @@ class Unit(models.Model):
Change.objects.create(
translation=self.translation,
action=Change.ACTION_COMPLETE,
user=request.user
user=request.user,
author=user
)
# Propagate to other projects
......
......@@ -74,7 +74,8 @@ class SuggestionManager(models.Manager):
unit=unit,
action=Change.ACTION_SUGGESTION,
translation=unit.translation,
user=user
user=user,
author=user
)
# Add unit vote
......@@ -229,7 +230,8 @@ class CommentManager(models.Manager):
unit=unit,
action=Change.ACTION_COMMENT,
translation=unit.translation,
user=user
user=user,
author=user
)
# Invalidate counts cache
......
......@@ -662,7 +662,8 @@ def auto_translation(request, project, subproject, lang):
change = Change.objects.create(
action=Change.ACTION_AUTO,
translation=unit.translation,
user=request.user
user=request.user,
author=request.user
)
# Save unit to backend
unit.save_backend(request, False, False)
......
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