mirror of
https://github.com/pretix/pretix.git
synced 2026-08-12 11:07:02 +00:00
Remove organizer property from ICalendar files as we used it not as it is intended to be used.
This commit is contained in:
@@ -31,7 +31,6 @@ def get_ical(events):
|
||||
vevent.add('dtstamp').value = creation_time
|
||||
if ev.location:
|
||||
vevent.add('location').value = str(ev.location)
|
||||
vevent.add('organizer').value = event.organizer.name
|
||||
vevent.add('uid').value = 'pretix-{}-{}-{}@{}'.format(
|
||||
event.organizer.slug, event.slug,
|
||||
ev.pk if not isinstance(ev, Event) else '0',
|
||||
@@ -57,5 +56,7 @@ def get_ical(events):
|
||||
datetime=date_format(ev.date_admission.astimezone(tz), 'SHORT_DATETIME_FORMAT')
|
||||
))
|
||||
|
||||
descr.append(_('Organizer: {organizer}').format(organizer=event.organizer.name))
|
||||
|
||||
vevent.add('description').value = '\n'.join(descr)
|
||||
return cal
|
||||
|
||||
@@ -884,7 +884,6 @@ class EventIcalDownloadTest(EventTestMixin, SoupTest):
|
||||
ical = self.client.get('/%s/%s/ical/' % (self.orga.slug, self.event.slug)).content.decode()
|
||||
self.assertIn('SUMMARY:%s' % self.event.name, ical, 'incorrect correct summary')
|
||||
self.assertIn('LOCATION:DUMMY ARENA', ical, 'incorrect location')
|
||||
self.assertIn('ORGANIZER:%s' % self.event.organizer.name, ical, 'incorrect organizer')
|
||||
self.assertTrue(re.search(r'DTSTAMP:\d{8}T\d{6}Z', ical), 'incorrect timestamp')
|
||||
self.assertTrue(re.search(r'UID:pretix-\w*-\w*-0@', ical), 'missing UID key')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user