Story: inactive tags that are marked for destruction are ok
This commit is contained in:
parent
26f17ae928
commit
e974083413
|
@ -188,7 +188,7 @@ class Story < ActiveRecord::Base
|
||||||
if !t.tag.valid_for?(u)
|
if !t.tag.valid_for?(u)
|
||||||
raise "#{u.username} does not have permission to use privileged " <<
|
raise "#{u.username} does not have permission to use privileged " <<
|
||||||
"tag #{t.tag.tag}"
|
"tag #{t.tag.tag}"
|
||||||
elsif t.tag.inactive? && !t.new_record?
|
elsif t.tag.inactive? && !t.new_record? && !t.marked_for_destruction?
|
||||||
# stories can have inactive tags as long as they existed before
|
# stories can have inactive tags as long as they existed before
|
||||||
raise "#{u.username} cannot add inactive tag #{t.tag.tag}"
|
raise "#{u.username} cannot add inactive tag #{t.tag.tag}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue