diff options
author | Marco Ziener <mziener@lavabit.com> | 2010-10-14 15:21:25 +0200 |
---|---|---|
committer | Marco Ziener <mziener@lavabit.com> | 2010-10-14 15:21:25 +0200 |
commit | ee91bed1f6d4eb661628811b786c3b7ad2ff11cd (patch) | |
tree | be7f01a42491784a1dd6d0fa20d9e1651eb9233c /server | |
parent | 6fec8b2bbfbd5ff9e4bf031cc8f110af262fe8dd (diff) | |
download | erlang-ee91bed1f6d4eb661628811b786c3b7ad2ff11cd.tar.gz erlang-ee91bed1f6d4eb661628811b786c3b7ad2ff11cd.tar.xz erlang-ee91bed1f6d4eb661628811b786c3b7ad2ff11cd.zip |
Fixed errors
Diffstat (limited to 'server')
-rw-r--r-- | server/media.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/media.erl b/server/media.erl index 9b58067..7c08caa 100644 --- a/server/media.erl +++ b/server/media.erl @@ -135,7 +135,7 @@ reset_votes(Artist, Title) -> lock(Artist, Title) -> F = fun() -> [Head|_] = ask(Artist, Title), - Votes = Head#track.votes - 1, + Votes = Head#track.lock = true, New = Head#track{votes = Votes}, mnesia:write(New) end, @@ -144,7 +144,7 @@ lock(Artist, Title) -> unlock(Artist, Title) -> F = fun() -> [Head|_] = ask(Artist, Title), - Votes = Head#track.votes -1, + Votes = Head#track.lock = false, New = Head#track{votes = Votes}, mnesia:write(New) end, |