forked from Anri/cal8tor
add desc only if available
This commit is contained in:
parent
bb09adfe22
commit
4ab23caf00
1 changed files with 3 additions and 1 deletions
|
@ -15,7 +15,9 @@ pub fn export(courses: Vec<crate::timetable::models::Course>, filename: &str) {
|
||||||
// Consume actual time
|
// Consume actual time
|
||||||
event.push(Transp::opaque());
|
event.push(Transp::opaque());
|
||||||
// Professor's name
|
// Professor's name
|
||||||
event.push(Description::new(course.professor.unwrap_or_default()));
|
if course.professor.is_some() {
|
||||||
|
event.push(Description::new(course.professor.unwrap()));
|
||||||
|
}
|
||||||
// Start time of the course
|
// Start time of the course
|
||||||
event.push(DtStart::new(dt_ical(course.dtstart.unwrap())));
|
event.push(DtStart::new(dt_ical(course.dtstart.unwrap())));
|
||||||
// End time of the course
|
// End time of the course
|
||||||
|
|
Reference in a new issue