artists: filter out duplicates from other names (#4028).

This commit is contained in:
evazion
2018-12-27 15:03:11 -06:00
parent 0dd44e64a4
commit 286bf2f285
2 changed files with 3 additions and 2 deletions

View File

@@ -242,7 +242,8 @@ class Artist < ApplicationRecord
end
def normalize_other_names
self.other_names = other_names.map { |x| Artist.normalize_name(x) }
self.other_names = other_names.map { |x| Artist.normalize_name(x) }.uniq
self.other_names -= [name]
end
end