From 3bed39113f475ae9b1243ab6a018169ef9bf8c92 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Mon, 4 Oct 2021 12:46:08 +0200 Subject: course, ics: location may be empty, make it an option As there may not be a location, make it an option type so we can easily add a warning in the title of an event. Signed-off-by: Alban Gruin --- src/course.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/course.ml') diff --git a/src/course.ml b/src/course.ml index 5ce2564..566ee0d 100644 --- a/src/course.ml +++ b/src/course.ml @@ -57,8 +57,8 @@ let loc_and_sum_to_groups = function | Groups groups | Summary (groups, _) | Location (groups, _, _) -> groups let loc_and_sum_to_location = function - | Nothing | Groups _ | Summary _ -> "" - | Location (_, _, location) -> location + | Nothing | Groups _ | Summary _ -> None + | Location (_, _, location) -> Some location let loc_and_sum_to_summary category = function | Nothing | Groups _ -> category -- cgit v1.2.1