]> source.dussan.org Git - redmine.git/commitdiff
Fixed: can not lock a topic when creating it.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 23 Jan 2008 17:48:48 +0000 (17:48 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 23 Jan 2008 17:48:48 +0000 (17:48 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1095 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/message.rb

index 038665cceae1bb45936abe4923f0eadbb48c1f25..12b1cd990fbc412a6ff821b8f60e2d62f7d84add 100644 (file)
@@ -36,7 +36,7 @@ class Message < ActiveRecord::Base
   
   def validate_on_create
     # Can not reply to a locked topic
-    errors.add_to_base 'Topic is locked' if root.locked?
+    errors.add_to_base 'Topic is locked' if root.locked? && self != root
   end
   
   def after_create