From: Jozef Zigmund <jzigmund(a)redhat.com>
---
src/app/controllers/deployables_controller.rb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/controllers/deployables_controller.rb
b/src/app/controllers/deployables_controller.rb
index 3e3b76a..e07a603 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -167,7 +167,8 @@ class DeployablesController < ApplicationController
end
# check that type attrs on service params are used properly
- if warnings = @deployable.check_service_params_types
+ warnings = @deployable.check_service_params_types
+ unless warnings.empty?
flash[:warning] ||= []
flash[:warning] = [flash[:warning]] if flash[:warning].kind_of? String
flash[:warning]+=warnings
@@ -207,7 +208,8 @@ class DeployablesController < ApplicationController
if @deployable.update_attributes(params[:deployable])
# check that type attrs on service params are used properly
- if warnings = @deployable.check_service_params_types
+ warnings = @deployable.check_service_params_types
+ unless warnings.empty?
flash[:warning] ||= []
flash[:warning] = [flash[:warning]] if flash[:warning].kind_of? String
flash[:warning]+=warnings
--
1.7.10.4
Show replies by date