[PATCH conductor] BZ 831687 Flash warning message fixed when it's empty

Jirka Tomasek jtomasek at redhat.com
Thu Jul 19 07:34:51 UTC 2012


On 07/18/2012 02:31 PM, jzigmund at redhat.com wrote:
> From: Jozef Zigmund <jzigmund at 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
ACK, the alert is not showing any more

Jirka




More information about the aeolus-devel mailing list