Fix price calculation

This commit is contained in:
Modulos 2017-05-14 02:17:48 +02:00
commit 46b918d175
2 changed files with 2 additions and 2 deletions

View file

@ -135,7 +135,7 @@ class VirtualMachineSerializer(serializers.Serializer):
def get_price(self, obj):
template = obj.template
price = float(template.cpu) * 5.0
price = float(template.vcpu) * 5.0
price += (int(template.memory)/1024 * 2.0)
for disk in template.disks:
price += int(disk.size)/1024 * 0.6