Commit d1ac7811 authored by Volker Krause's avatar Volker Krause
Browse files

Don't fail on location-less events

We can end up there with online events for example.
parent 7a9a7bf3
...@@ -42,7 +42,7 @@ App.TimelineDelegate { ...@@ -42,7 +42,7 @@ App.TimelineDelegate {
spacing: Kirigami.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
QQC2.Label { QQC2.Label {
text: reservationFor.location.name text: reservationFor.location != undefined ? reservationFor.location.name : ""
} }
App.PlaceDelegate { App.PlaceDelegate {
place: reservationFor.location place: reservationFor.location
...@@ -50,6 +50,7 @@ App.TimelineDelegate { ...@@ -50,6 +50,7 @@ App.TimelineDelegate {
isRangeBegin: root.rangeType == TimelineElement.RangeBegin isRangeBegin: root.rangeType == TimelineElement.RangeBegin
isRangeEnd: root.rangeType == TimelineElement.RangeEnd isRangeEnd: root.rangeType == TimelineElement.RangeEnd
width: topLayout.width width: topLayout.width
visible: reservationFor.location != undefined
} }
QQC2.Label { QQC2.Label {
text: i18n("Start time: %1", Localizer.formatDateTime(reservationFor, "startDate")) text: i18n("Start time: %1", Localizer.formatDateTime(reservationFor, "startDate"))
......
...@@ -42,12 +42,14 @@ App.DetailsPage { ...@@ -42,12 +42,14 @@ App.DetailsPage {
QQC2.Label { QQC2.Label {
Kirigami.FormData.label: i18n("Location:") Kirigami.FormData.label: i18n("Location:")
text: reservationFor.location.name text: reservationFor.location != undefined ? reservationFor.location.name : ""
visible: reservationFor.location != undefined
} }
App.PlaceDelegate { App.PlaceDelegate {
place: reservationFor.location place: reservationFor.location
controller: root.controller controller: root.controller
visible: reservationFor.location != undefined
} }
QQC2.Label { QQC2.Label {
......
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