Skip to content
Snippets Groups Projects
Commit 8022cced authored by David Siegfried's avatar David Siegfried
Browse files

fixes #2374

Closes #2374

Merge request studip/studip!1560
parent 80722a31
No related branches found
No related tags found
No related merge requests found
......@@ -816,16 +816,18 @@ class ResourceRequest extends SimpleORMap implements PrivacyObject, Studip\Calen
return $start_date;
}
$fist_date = $this->cycle->dates->first();
if (isset($this->cycle) && count($this->cycle->dates) > 0) {
$first_date = $this->cycle->dates->first();
if ($this->metadate_id && isset($first_date->date)) {
$start_date->setTimestamp($first_date->date);
return $start_date;
}
if ($this->course_id && isset($first_date->date)) {
$start_date->setTimestamp($fist_date->date);
$start_date->setTimestamp($first_date->date);
return $start_date;
}
}
if ($this->begin) {
$start_date->setTimestamp($this->begin);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment