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

Generate changes/notifications only on real change

parent cd5a0c8d
......@@ -2147,15 +2147,16 @@ class Unit(models.Model):
self.translation.update_stats()
# Notify subscribed users about new translation
subscriptions = Profile.objects.subscribed_any_translation(
self.translation.subproject.project,
self.translation.language
)
for subscription in subscriptions:
subscription.notify_any_translation(self, oldunit)
if saved:
subscriptions = Profile.objects.subscribed_any_translation(
self.translation.subproject.project,
self.translation.language
)
for subscription in subscriptions:
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