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

Generate changes/notifications only on real change

parent cd5a0c8d
......@@ -2147,6 +2147,7 @@ class Unit(models.Model):
self.translation.update_stats()
# Notify subscribed users about new translation
if saved:
subscriptions = Profile.objects.subscribed_any_translation(
self.translation.subproject.project,
self.translation.language
......@@ -2155,7 +2156,7 @@ class Unit(models.Model):
subscription.notify_any_translation(self, oldunit)
# Generate Change object for this change
if gen_change:
if saved and gen_change:
# Get list of subscribers for new contributor
subscriptions = Profile.objects.subscribed_new_contributor(
self.translation.subproject.project,
......
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