[Ovirt-devel] [PATCH server] fixed UI update bug -- ignore task_types when it doesn't exist

Scott Seago
Fri, 29 May 2009 04:09:51 -0000

Signed-off-by: Scott Seago <sseago at redhat.com>
---
 src/app/views/task/_show.rhtml |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/app/views/task/_show.rhtml b/src/app/views/task/_show.rhtml
index f4e001d..ff7d434 100644
--- a/src/app/views/task/_show.rhtml
+++ b/src/app/views/task/_show.rhtml
@@ -75,7 +75,9 @@
           <img src="images/jumbo_find.png" alt="find"
width="145" height="145">

There are no tasks that match this filter.
- Type: <%= task_types.select {|type|
type[1]==task_type}[0][0] %>
+             <%if task_types %>
+ Type: <%= task_types.select {|type|
type[1]==task_type}[0][0] %>
+             <% end %>
State: <%= task_states.select {|state|
state[1]==task_state}[0][0] %>
Choose another filter to display tasks.

--
1.6.0.6