Skip to content

Commit

Permalink
Avoid NoMethod error in TemplatePreloadedAttributesDecorator.new
Browse files Browse the repository at this point in the history
Currently the constructor of the 'TemplatePreloadedAttributesDecorator'
class receives a parameter that defaults to 'nil', and that it is
actually never used. But the implementation of the constructor tries
call methods on it, 'NoMethodError'. The net result is that refresh
fails. To avoid that this patch removes that unused parameter.

This patch addresses the following issue:

  RHV Refresh worker throwing error in evm.log
  https://bugzilla.redhat.com/1501162

Signed-off-by: Juan Hernandez <[email protected]>
  • Loading branch information
jhernand committed Oct 13, 2017
1 parent c74ef80 commit 2d0a6d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ def self.disk_from_attachment(connection, attachment, preloaded_disks)

class TemplatePreloadedAttributesDecorator < SimpleDelegator
attr_reader :disks
def initialize(template, connection, preloaded_disks = nil, future_disk_attachments = nil)
def initialize(template, connection, preloaded_disks = nil)
@obj = template
@disks = AttachedDisksFetcher.get_attached_disks_from_futures(template, connection, preloaded_disks, future_disk_attachments[template.id])
@disks = AttachedDisksFetcher.get_attached_disks_from_futures(template, connection, preloaded_disks, nil)
super(template)
end
end
Expand Down

0 comments on commit 2d0a6d3

Please sign in to comment.