Skip to content

Commit

Permalink
Fix event url 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Merlin Buczek committed Sep 12, 2019
1 parent 94b4074 commit b48d1f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def update_site_forward(apps, schema_editor):
Site.objects.update_or_create(
id=settings.SITE_ID,
defaults={
"domain": "twiki.molgen.mpg.de",
"domain": "intranet.molgen.mpg.de",
"name": "MPI CMS",
},
)
Expand Down
4 changes: 1 addition & 3 deletions mpicms/events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from datetime import datetime

from django.db import models
from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _

Expand Down Expand Up @@ -129,7 +128,6 @@ def clean(self): # Prevent more than one event index

@property
def ics(self):
site = Site.objects.get_current()
c = Calendar()
for event in self.events:
print(event.url)
Expand All @@ -138,7 +136,7 @@ def ics(self):
begin = event.start,
end = event.end,
description = event.search_description,
url = 'https://' + site.domain + event.url,
url = event.full_url,
location = event.room
)
c.events.add(e)
Expand Down

0 comments on commit b48d1f1

Please sign in to comment.