apply squash_history_entries

remotes/origin/release/3.1.1
Miguel Gonzalez 2018-02-05 21:19:09 +01:00
parent dbafa5264d
commit 1a3b6bc3ca
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,7 @@ from taiga.projects.history.services import (make_key_from_model_object,
from taiga.permissions.services import user_has_perm from taiga.permissions.services import user_has_perm
from .models import HistoryChangeNotification, Watched from .models import HistoryChangeNotification, Watched
from .squashing import squash_history_entries
def notify_policy_exists(project, user) -> bool: def notify_policy_exists(project, user) -> bool:
@ -250,6 +251,8 @@ def send_sync_notifications(notification_id):
return return
history_entries = tuple(notification.history_entries.all().order_by("created_at")) history_entries = tuple(notification.history_entries.all().order_by("created_at"))
history_entries = squash_history_entries(history_entries)
obj, _ = get_last_snapshot_for_key(notification.key) obj, _ = get_last_snapshot_for_key(notification.key)
obj_class = get_model_from_key(obj.key) obj_class = get_model_from_key(obj.key)