[standard] fix violations

This commit is contained in:
2023-06-15 20:22:07 +10:00
parent 703f9f9efd
commit 85dd61510e
3 changed files with 7 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ module Adamantium
end
if track
mb_id = track["mbid"] == {} ? "unknown" : track["mbid"]
mb_id = (track["mbid"] == {}) ? "unknown" : track["mbid"]
top_track_repo.upsert(post_id: post.id, name: track["name"], artist: track.dig("artist", "content"), url: track["url"], mb_id: mb_id)
end

View File

@@ -10,7 +10,7 @@ module Adamantium
def upsert(post_id:, name:, artist:, url:, mb_id:)
top_tracks
.upsert({name: name, artist: artist, url: url, mb_id: mb_id, post_id: post_id},
{ target: :post_id, update: {name: name, artist: artist, url: url, mb_id: mb_id, post_id: post_id} })
{target: :post_id, update: {name: name, artist: artist, url: url, mb_id: mb_id, post_id: post_id}})
end
end
end