Skip to content

Commit bd611b4

Browse files
committed
fix run list expansion in view code to use correct environment
of course, it seems fair to ask if we should be expanding run lists in views...
1 parent e30dc05 commit bd611b4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

chef-server-api/app/controllers/nodes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def cookbooks_for_node(all_cookbooks)
109109
# expand returns a RunListExpansion which contains recipes, default and override attrs [cb]
110110
# TODO: check for this on the client side before we make the http request [stephen 9/1/10]
111111
begin
112-
recipes = @node.run_list.expand('couchdb').recipes.with_versions
112+
recipes = @node.run_list.expand('couchdb', @node.chef_environment).recipes.with_versions
113113
rescue Chef::Exceptions::RecipeVersionConflict => e
114114
raise PreconditionFailed, "#Conflict: #{e.message}"
115115
end

chef-server-webui/app/views/nodes/show.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
%td= run_list_item.type
2929
.left.accordion
3030
%h3.head= link_to("Recipes", "#")
31-
- recipes = @node.run_list.expand('server').recipes
31+
- recipes = @node.run_list.expand('server', :environment => @node.chef_environment).recipes
3232
%div
3333
%span.description.form.help
3434
This is the list of recipes, fully expanded, as they will be applied to the node in question.

0 commit comments

Comments
 (0)