Skip to content

Commit

Permalink
use search instead of details, this is faster
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Mar 10, 2017
1 parent fb55803 commit e4c69df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion katello-attach-subscription
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def vdcupdate()
# if subs[desired_sub] is false, retrieve the current subscription detail
begin
# this will retrieve the sub detail only once for each sub
subs[desired_sub] ||= api.resource(:subscriptions).call(:show, {:id => desired_sub, :organization_id => @options[:org]})
subs[desired_sub] ||= api.resource(:subscriptions).call(:index, {:search => "id=#{desired_sub}", :organization_id => @options[:org]})['results'][0]
# in case of error adding the subscription, stop the process
rescue Exception => e
puts " ERROR: unable to retrieve subscription #{desired_sub}"
Expand Down

0 comments on commit e4c69df

Please sign in to comment.