diff --git a/app/models/transaction/signature_detection.rb b/app/models/transaction/signature_detection.rb index 7f85183cb..f44a5a230 100644 --- a/app/models/transaction/signature_detection.rb +++ b/app/models/transaction/signature_detection.rb @@ -52,10 +52,11 @@ class Transaction::SignatureDetection return if !user return if !user.preferences return if !user.preferences[:signature_detection] - article.preferences[:signature_detection] = SignatureDetection.find_signature_line_by_article( + line = SignatureDetection.find_signature_line_by_article( user, article ) + article.preferences[:signature_detection] = line article.save end diff --git a/lib/signature_detection.rb b/lib/signature_detection.rb index 18594b4cd..f0275bbe2 100644 --- a/lib/signature_detection.rb +++ b/lib/signature_detection.rb @@ -157,7 +157,7 @@ returns =end - def find_signature_line_by_article(user, article) + def self.find_signature_line_by_article(user, article) return if !user.preferences[:signature_detection] SignatureDetection.find_signature_line( user.preferences[:signature_detection],