From b76c4c340fd8b4fcd7c2ac9237b4f8a8751c3588 Mon Sep 17 00:00:00 2001 From: Nikolay Zhuravlev Date: Sat, 13 Apr 2024 01:53:10 +0200 Subject: [PATCH] Fix reversion after update (2) --- anytask/tasks/management/commands/send_task_notifications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anytask/tasks/management/commands/send_task_notifications.py b/anytask/tasks/management/commands/send_task_notifications.py index b1555cce..86c918ea 100644 --- a/anytask/tasks/management/commands/send_task_notifications.py +++ b/anytask/tasks/management/commands/send_task_notifications.py @@ -14,6 +14,7 @@ import time from reversion import revisions as reversion +from reversion.models import Version import pytz @@ -43,7 +44,7 @@ def handle(self, **options): task_created = False task_changed = False - version_list = reversion.get_for_object(task).get_unique() + version_list = Version.objects.get_for_object(task).get_unique() task_info = [''] * len(DIFF_FIELDS) for i_version, version in enumerate(version_list):