From a199812c6e2cb7f9372ad6a3edbc49d2dd5d985e Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 15 Mar 2023 20:45:12 +0100 Subject: [PATCH] events: Remove extra "\n" from ics output We don't need to use "\n" joiners for the output of the ics.Calendar iterator, because the lines already contain "\r\n" termination. If fact, ics.Calendar.__str__() returns the calendar as an ics formated string, so just return the icx calendar itself. Newer versions of ics have better serialisation, but we don't want to complicate things by library updates now. --- mpicms/events/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpicms/events/models.py b/mpicms/events/models.py index 819aca5..f7347f5 100644 --- a/mpicms/events/models.py +++ b/mpicms/events/models.py @@ -136,7 +136,7 @@ def ics(self): if type(event.start) is date: e.make_all_day() c.events.add(e) - return '\n'.join(c) + return c class Meta: # noqa