Skip to content

Commit

Permalink
Merge pull request #34 from molgen/fix-all-day-events
Browse files Browse the repository at this point in the history
calendar: Fix all day events
  • Loading branch information
donald authored Nov 14, 2019
2 parents 592ca04 + 6411d79 commit aa7f886
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mpicms/events/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import json
from datetime import datetime
from datetime import datetime, date
from ics import Calendar, Event as ICSEvent

from django.db import models
Expand Down Expand Up @@ -138,6 +138,8 @@ def ics(self):
url=event.full_url,
location=event.room
)
if type(event.start) is date:
e.make_all_day()
c.events.add(e)
return '\n'.join(c)

Expand Down

0 comments on commit aa7f886

Please sign in to comment.