From 67d45b85f87bf7a9689d334c96d331aa90358643 Mon Sep 17 00:00:00 2001 From: GowthamShanmugasundaram Date: Tue, 18 Jun 2019 05:10:30 +0000 Subject: [PATCH] Stop displaying deleted volumes in tendrl-ui bugzilla: 1719033 tendrl-bug-id: Tendrl/api#463 Signed-off-by: GowthamShanmugasundaram --- app/presenters/volume_presenter.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/presenters/volume_presenter.rb b/app/presenters/volume_presenter.rb index 4995e9a..4e8e1d2 100644 --- a/app/presenters/volume_presenter.rb +++ b/app/presenters/volume_presenter.rb @@ -4,10 +4,12 @@ def list(raw_volumes) volumes = [] raw_volumes.each do |volume| volume.each do |vol_id, attributes| - attributes['vol_id'] = vol_id - attributes.delete('bricks') - attributes.delete('options') - volumes << attributes + if attributes['deleted'] != true + attributes['vol_id'] = vol_id + attributes.delete('bricks') + attributes.delete('options') + volumes << attributes + end end end volumes