From: Yoan Le Clanche Date: Tue, 21 Feb 2023 15:27:24 +0000 (+0100) Subject: remove publication date from notification : https://trackers.pilotsystems.net/prebarr... X-Git-Tag: 2.9.0~72^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d7345b4f545e9d2b879bef7547d8f7d5a34ea65e;p=teleforma.git remove publication date from notification : https://trackers.pilotsystems.net/prebarreau/0640 --- 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