mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-23 08:31:00 +00:00
Add back lock now that db supports it
This commit is contained in:
parent
a68a9a8d51
commit
ac9780472e
1 changed files with 1 additions and 1 deletions
|
@ -410,7 +410,7 @@ defmodule LiveBeats.MediaLibrary do
|
|||
|
||||
multi =
|
||||
Ecto.Multi.new()
|
||||
# |> lock_playlist(song.user_id)
|
||||
|> lock_playlist(song.user_id)
|
||||
|> Ecto.Multi.run(:index, fn repo, _changes ->
|
||||
case repo.one(from(s in Song, where: s.user_id == ^song.user_id, select: count(s.id))) do
|
||||
count when new_index < count -> {:ok, new_index}
|
||||
|
|
Loading…
Reference in a new issue