fix: remove extra ':' after DTSTAMP in .ics templates (#4762)

This commit is contained in:
Jennifer Richards 2022-11-15 14:22:00 -04:00 committed by GitHub
parent aefb5f1ca1
commit 8caa4ce0cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -10,7 +10,7 @@ SUMMARY:{% if item.session.name %}{{item.session.name|ics_esc}}{% else %}{% if n
CLASS:PUBLIC
DTSTART{% ics_date_time item.timeslot.local_start_time schedule.meeting.time_zone %}
DTEND{% ics_date_time item.timeslot.local_end_time schedule.meeting.time_zone %}
DTSTAMP:{% ics_date_time item.timeslot.modified|utc 'utc' %}{% if item.session.agenda %}
DTSTAMP{% ics_date_time item.timeslot.modified|utc 'utc' %}{% if item.session.agenda %}
URL:{{item.session.agenda.get_versionless_href}}{% endif %}
DESCRIPTION:{{item.timeslot.name|ics_esc}}\n{% if item.session.agenda_note %}
Note: {{item.session.agenda_note|ics_esc}}\n{% endif %}{% if item.timeslot.location.webex_url %}

View file

@ -10,7 +10,7 @@ SUMMARY:{% if item.session.name %}{{item.session.group.acronym|lower}} - {{item.
CLASS:PUBLIC
DTSTART{% ics_date_time item.timeslot.local_start_time item.schedule.meeting.time_zone %}
DTEND{% ics_date_time item.timeslot.local_end_time item.schedule.meeting.time_zone %}
DTSTAMP:{% ics_date_time item.timeslot.modified|utc 'utc' %}
DTSTAMP{% ics_date_time item.timeslot.modified|utc 'utc' %}
{% if item.session.agenda %}URL:{{item.session.agenda.get_href}}
DESCRIPTION:{{item.timeslot.name|ics_esc}}\n{% if item.session.agenda_note %}
Note: {{item.session.agenda_note|ics_esc}}\n{% endif %}{% for material in item.session.materials.all %}

View file

@ -145,6 +145,10 @@ def assert_ical_response_is_valid(test_inst, response, expected_event_summaries=
test_inst.assertContains(response, 'END:VEVENT', count=expected_event_count)
test_inst.assertContains(response, 'UID', count=expected_event_count)
# make sure no doubled colons after timestamp properties
test_inst.assertNotContains(response, 'DTSTART::')
test_inst.assertNotContains(response, 'DTEND::')
test_inst.assertNotContains(response, 'DTSTAMP::')
class ReverseLazyTest(django.test.TestCase):