Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
donald committed Mar 15, 2023
1 parent e722229 commit a199812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpicms/events/models.py
Expand Up @@ -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
Expand Down

0 comments on commit a199812

Please sign in to comment.