Fix: NGワード履歴重複チェックのクエリミス (#570)

This commit is contained in:
KMY(雪あすか) 2024-02-16 19:31:12 +09:00 committed by GitHub
parent b2fae3ca84
commit 2b078b83c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,7 @@ class Admin::NgWord
return unless options[:uri] && options[:target_type]
return if options.key?(:public) && !options.delete(:public)
return if NgwordHistory.where('created_at > ?', 1.day.ago).exists?(uri: options[:uri], keyword: options[:keyword])
return if NgwordHistory.where('created_at > ?', 1.day.ago).exists?(uri: options[:uri], keyword: keyword)
NgwordHistory.create(options.merge({
reason: type,