From d7345b4f545e9d2b879bef7547d8f7d5a34ea65e Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Tue, 21 Feb 2023 16:27:24 +0100 Subject: [PATCH] remove publication date from notification : https://trackers.pilotsystems.net/prebarreau/0640 --- .../teleforma-publish-notify-conferences.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/teleforma/management/commands/teleforma-publish-notify-conferences.py b/teleforma/management/commands/teleforma-publish-notify-conferences.py index f2a457d1..761fdff0 100644 --- a/teleforma/management/commands/teleforma-publish-notify-conferences.py +++ b/teleforma/management/commands/teleforma-publish-notify-conferences.py @@ -114,7 +114,16 @@ class Command(BaseCommand): # media = conference.media.filter(mime_type='video/mp4')[0] url = reverse('teleforma-media-detail', args=[conference.period.id, linked_media.id]) - message = "Nouvelle conférence publiée : " + str(conference) + + if conference.professor: + elm = [conference.course.title, + conference.course_type.name, conference.session, + conference.professor.user.first_name, + conference.professor.user.last_name] + else: + elm = [conference.course.title, + conference.course_type.name, conference.session] + message = "Nouvelle conférence publiée : " + ' - '.join(elm) students = Student.objects.filter(period=publication.period, platform_only=True) for student in students: @@ -135,7 +144,7 @@ class Command(BaseCommand): for user in User.objects.filter(is_staff=True): notify(user, message, url) - publication.notified = True + # publication.notified = True publication.save() # streaming published end conference should have a streaming propery set to False -- 2.39.5