Skip to content

Commit

Permalink
Always return 0 for missing num_cpu
Browse files Browse the repository at this point in the history
Always return 0 for missing num_cpu

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1624535
  • Loading branch information
Ladas committed Sep 3, 2018
1 parent eaef4fb commit 8bfe78c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/vm_or_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ def ram_size_in_bytes_by_state
end

def num_cpu
hardware.nil? ? 0 : hardware.cpu_sockets
hardware.try(:cpu_sockets) || 0
end

def num_disks
Expand Down

0 comments on commit 8bfe78c

Please sign in to comment.