Skip to content

Commit

Permalink
Set session[:snap_selected] to nil if Snapshot does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
bmclaughlin committed Jan 27, 2017
1 parent fc53af6 commit 722bd2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/vm_common.rb
Expand Up @@ -269,6 +269,7 @@ def show(id = nil)
elsif @display == "snapshot_info"
drop_breadcrumb(:name => @record.name + _(" (Snapshots)"),
:url => "/#{rec_cls}/show/#{@record.id}?display=#{@display}")
session[:snap_selected] = nil if Snapshot.find_by(:id => session[:snap_selected]).nil?
@sb[@sb[:active_accord]] = TreeBuilder.build_node_id(@record)
@snapshot_tree = TreeBuilderSnapshots.new(:snapshot_tree, :snapshot, @sb, true, :root => @record)
@active = if @snapshot_tree.selected_node
Expand Down

0 comments on commit 722bd2c

Please sign in to comment.