Only set an enddate if one is available
This commit is contained in:
parent
60090ad619
commit
0691e1e537
2 changed files with 4 additions and 2 deletions
|
@ -79,6 +79,7 @@ class LocationController extends Controller
|
||||||
/** @var Event $entity */
|
/** @var Event $entity */
|
||||||
$event = new CalendarEvent();
|
$event = new CalendarEvent();
|
||||||
$event->setStart($entity->startdate);
|
$event->setStart($entity->startdate);
|
||||||
|
if ($entity->enddate instanceof \DateTime)
|
||||||
$event->setEnd($entity->enddate);
|
$event->setEnd($entity->enddate);
|
||||||
$event->setSummary($entity->summary);
|
$event->setSummary($entity->summary);
|
||||||
$event->setDescription($entity->description);
|
$event->setDescription($entity->description);
|
||||||
|
|
|
@ -75,6 +75,7 @@ class TagController extends Controller
|
||||||
/** @var Event $entity */
|
/** @var Event $entity */
|
||||||
$event = new CalendarEvent();
|
$event = new CalendarEvent();
|
||||||
$event->setStart($entity->startdate);
|
$event->setStart($entity->startdate);
|
||||||
|
if ($entity->enddate instanceof \DateTime)
|
||||||
$event->setEnd($entity->enddate);
|
$event->setEnd($entity->enddate);
|
||||||
$event->setSummary($entity->summary);
|
$event->setSummary($entity->summary);
|
||||||
$event->setDescription($entity->description);
|
$event->setDescription($entity->description);
|
||||||
|
|
Reference in a new issue