Commit 13a823a0 authored by Lars Kruse's avatar Lars Kruse

Merge branch 'fix-calendar-with-missing-dates'

Fix a bug in the calendar export code, that breaks for events without an
end time ("until_time").
parents 461e2fa4 c5db94e9
Pipeline #1280 failed with stage
in 1 minute and 42 seconds
......@@ -13,6 +13,7 @@ stadt/settings/
# debian shizzle
This diff is collapsed.
......@@ -138,8 +138,12 @@ class BaseCalendarFeed(ICalFeed):
return item.content.first().time.astimezone(tz)
def item_end_datetime(self, item):
tz = django.utils.timezone.get_default_timezone()
return item.content.first().until_time.astimezone(tz)
end_time = item.content.first().until_time
if end_time is None:
return None
tz = django.utils.timezone.get_default_timezone()
return end_time.astimezone(tz)
class GroupCalendarFeed(BaseCalendarFeed, features.groups.views.Mixin):
......@@ -43,3 +43,10 @@ test_py: virtualenv_check
.PHONY: test_js
test_js: $(DIR_NODE) lint_js
$(RUN_NODE) "$(BIN_NODE_PKG)" run test
.PHONY: report-python-coverage
coverage_py: virtualenv_check
STADTGESTALTEN_PRESET=test python -m coverage run -m manage test
python -m coverage report
python -m coverage html --directory="$(DIR_BUILD)/coverage-report"
@echo "Coverage Report Location: file://$(realpath $(DIR_BUILD))/coverage-report/index.html"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment