MDL-59382 calendar: fix editing event duration

This commit is contained in:
Ryan Wyllie 2017-08-03 06:45:19 +00:00
parent ee640d3f2d
commit 6cb580713b

View File

@ -834,9 +834,12 @@ class core_calendar_external extends external_api {
if (is_null($legacyevent)) {
$legacyevent = new \calendar_event($properties);
// Need to do this in order to initialise the description
// property which then triggers the update function below
// to set the appropriate default properties on the event.
$properties = $legacyevent->properties(true);
}
$properties = $legacyevent->properties(true);
$legacyevent->update($properties);
$eventmapper = event_container::get_event_mapper();