Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
3e312658
Commit
3e312658
authored
Mar 28, 2014
by
Stephane Glondu
Browse files
Bugfix: featured elections were added at each server startup
parent
63e096c6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/web/web_site.ml
View file @
3e312658
...
...
@@ -156,12 +156,6 @@ module Make (C : CONFIG) : SITE = struct
let
module
X
:
EMPTY
=
R
.
Register
(
S
)
(
T
)
in
let
election
=
(
module
W
:
WEB_ELECTION
)
in
election_table
:=
SMap
.
add
uuid
election
!
election_table
;
lwt
()
=
if
W
.
featured
then
(
lwt
the_featured
=
Ocsipersist
.
get
featured
in
Ocsipersist
.
set
featured
(
uuid
::
the_featured
)
)
else
return
()
in
return
election
let
()
=
import_election_ref
:=
fun
featured
f
->
...
...
@@ -201,6 +195,10 @@ module Make (C : CONFIG) : SITE = struct
Ocsipersist
.
add
election_ptable
uuid
(
raw_election
,
web_params
)
>>
lwt
election
=
register_election
params
web_params
in
let
module
W
=
(
val
election
:
WEB_ELECTION
)
in
lwt
()
=
if
W
.
featured
then
S
.
add_featured_election
uuid
else
return
()
in
begin
try_lwt
let
()
=
Ocsigen_messages
.
debug
(
fun
()
->
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment