about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-08-20 10:33:24 +0200
committerThibaut Girka <thib@sitedethib.com>2019-08-20 10:33:24 +0200
commitdf150da4355bb224913f6de2940c9135714fb53f (patch)
tree0301dfdea48280c3942fc00da2d478f9360c148c /app/models
parent1d40325e7c9f8f380d4bb2ac55beedfb1bef5009 (diff)
parent97af209c3113926534fe8c5adb7ad51fa4527cbe (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- config/initializers/content_security_policy.rb
  (took our version)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/tag.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/tag.rb b/app/models/tag.rb
index 5094d973d..945e3a3c6 100644
--- a/app/models/tag.rb
+++ b/app/models/tag.rb
@@ -114,7 +114,7 @@ class Tag < ApplicationRecord
   class << self
     def find_or_create_by_names(name_or_names)
       Array(name_or_names).map(&method(:normalize)).uniq { |str| str.mb_chars.downcase.to_s }.map do |normalized_name|
-        tag = matching_name(normalized_name).first || create(name: normalized_name)
+        tag = matching_name(normalized_name).first || create!(name: normalized_name)
 
         yield tag if block_given?