]> source.dussan.org Git - redmine.git/commitdiff
Display flash message if enumerations were actually saved (#19861).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 19 Oct 2015 17:04:47 +0000 (17:04 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 19 Oct 2015 17:04:47 +0000 (17:04 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14691 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/project_enumerations_controller.rb

index c3d2da9282bfbdcda797ebbbeba17cf70877d163..2326eb2c48fb903445318bbf342bf2742d9927ce 100644 (file)
@@ -21,12 +21,14 @@ class ProjectEnumerationsController < ApplicationController
 
   def update
     if params[:enumerations]
-      Project.transaction do
+      saved = Project.transaction do
         params[:enumerations].each do |id, activity|
           @project.update_or_create_time_entry_activity(id, activity)
         end
       end
-      flash[:notice] = l(:notice_successful_update)
+      if saved
+        flash[:notice] = l(:notice_successful_update)
+      end
     end
 
     redirect_to settings_project_path(@project, :tab => 'activities')