Skip to content

Commit

Permalink
remove option type from Workshop.presentation.additional_links
Browse files Browse the repository at this point in the history
  • Loading branch information
egmaleta committed Feb 17, 2024
1 parent 3613656 commit 2611df7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ocamlorg_data/data.mli
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ module Workshop : sig
video : string option;
slides : string option;
poster : bool;
additional_links : string list option;
additional_links : string list;
}

type t = {
Expand Down
8 changes: 5 additions & 3 deletions tool/ood-gen/lib/workshop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ type presentation = {
video : string option;
slides : string option;
poster : bool;
additional_links : string list option;
additional_links : string list;
}
[@@deriving
stable_record ~version:presentation_metadata ~modify:[ poster ],
stable_record ~version:presentation_metadata
~modify:[ poster; additional_links ],
show { with_path = false }]

type t = {
Expand All @@ -75,6 +76,7 @@ type t = {
let of_presentation_metadata pm =
presentation_of_presentation_metadata pm
~modify_poster:(Option.value ~default:false)
~modify_additional_links:(Option.value ~default:[])

let of_metadata m =
of_metadata m ~slug:(Utils.slugify m.title)
Expand Down Expand Up @@ -116,7 +118,7 @@ type presentation = {
video : string option;
slides : string option;
poster : bool;
additional_links : string list option;
additional_links : string list;
}

type t = {
Expand Down

0 comments on commit 2611df7

Please sign in to comment.