[PATCH conductor] Error message fixed for creating new deployable without providing url for the xml

ifarkas at redhat.com ifarkas at redhat.com
Thu Dec 29 12:40:09 UTC 2011


From: Imre Farkas <ifarkas at redhat.com>

https://bugzilla.redhat.com/show_bug.cgi?id=770809
---
 src/app/controllers/deployables_controller.rb |    6 +++++-
 src/config/locales/en.yml                     |    1 +
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb
index 13d4f3e..05473b2 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -258,7 +258,11 @@ class DeployablesController < ApplicationController
         response
       end
     rescue RestClient::Exception, SocketError, URI::InvalidURIError
-      flash[:error] = t('catalog_entries.flash.warning.not_valid_or_reachable', :url => url)
+      if url.present?
+        flash[:error] = t('catalog_entries.flash.warning.not_valid_or_reachable', :url => url)
+      else
+        flash[:error] = t('catalog_entries.flash.warning.no_url_provided')
+      end
       nil
     end
   end
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 0275275..94e9873 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -631,6 +631,7 @@ en:
     flash:
       warning:
         not_valid_or_reachable: "Catalog entry XML file is either invalid or no longer reachable at %{url}"
+        no_url_provided: "No URL provided for the catalog entry XML file."
         not_valid: "Deployable XML file doesn't resolve valid XML"
         failed: Catalog entry was not created.
       notice:
-- 
1.7.6.4




More information about the aeolus-devel mailing list