From: Jean-Philippe Lang Date: Wed, 23 Jan 2008 17:48:48 +0000 (+0000) Subject: Fixed: can not lock a topic when creating it. X-Git-Tag: 0.7.0-RC1~191 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d54ba39e7aced22dd352273ec4af4b345a827363;p=redmine.git Fixed: can not lock a topic when creating it. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1095 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/message.rb b/app/models/message.rb index 038665cce..12b1cd990 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -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