Commit 0e33c704 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Raise 404 in get_election_by_uuid if Not_found

parent 78bc1a42
......@@ -79,7 +79,10 @@ let () =
| None -> ()
let get_election_by_uuid x =
Ocsipersist.find elections_table (Uuidm.to_string x)
try_lwt
Ocsipersist.find elections_table (Uuidm.to_string x)
with Not_found ->
raise_lwt Eliom_common.Eliom_404
let get_featured_elections () =
(* FIXME: doesn't scale when there are a lot of unfeatured elections *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment