Change cores to float before multiplication
This commit is contained in:
parent
6a5a5ed160
commit
fa018739c9
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ class VirtualMachineSerializer(serializers.Serializer):
|
|||
return manager.get_vm(opennebula_id)
|
||||
|
||||
def get_cores(self, obj):
|
||||
return (obj.template.cpu) * 10
|
||||
return float(obj.template.cpu) * 10
|
||||
|
||||
def get_memory(self, obj):
|
||||
return int(obj.template.memory) / 1024
|
||||
|
|
Loading…
Reference in a new issue