summaryrefslogtreecommitdiffstats
path: root/app/models/journal.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-19 19:09:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-19 19:09:47 +0000
commit0e4e0a795a7259a096fbbecbf12dcd16d99de0e9 (patch)
treeb05ee0e72482c51b939aca1c6f978dc10455da27 /app/models/journal.rb
parentecfc40629f1e9e266b190f54da264f31b153cdb3 (diff)
downloadredmine-0e4e0a795a7259a096fbbecbf12dcd16d99de0e9.tar.gz
redmine-0e4e0a795a7259a096fbbecbf12dcd16d99de0e9.zip
Fixed: unable to add a file to an issue without entering a note.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@853 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/journal.rb')
-rw-r--r--app/models/journal.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb
index 6e7632e73..a68988a7b 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -28,4 +28,9 @@ class Journal < ActiveRecord::Base
:include => :issue,
:project_key => "#{Issue.table_name}.project_id",
:date_column => "#{Issue.table_name}.created_on"
+
+ def save
+ # Do not save an empty journal
+ (details.empty? && notes.blank?) ? false : super
+ end
end