[Ovirt-devel] [PATCH server] fixed bug in PartialSuccessError handling -- error message generation was failing when exception was thrown before the failed object was actually created.

Scott Seago sseago at redhat.com
Thu May 14 18:11:32 UTC 2009


Signed-off-by: Scott Seago <sseago at redhat.com>
---
 src/app/controllers/application.rb |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/app/controllers/application.rb b/src/app/controllers/application.rb
index 14fe618..e9c515f 100644
--- a/src/app/controllers/application.rb
+++ b/src/app/controllers/application.rb
@@ -123,7 +123,11 @@ class ApplicationController < ActionController::Base
 
   def handle_partial_success_error(error)
     failures_arr = error.failures.collect do |resource, reason|
-      resource.display_name + ": " + reason
+      if resource
+        resource.display_name + ": " + reason
+      else
+        reason
+      end
     end
     @successes = error.successes
     @failures = error.failures
-- 
1.6.0.6




More information about the ovirt-devel mailing list