Wrong multiplication to string instead of number

This commit is contained in:
PCoder 2019-04-09 00:26:59 +02:00
parent 316496b969
commit 9f58fdd456
1 changed files with 1 additions and 1 deletions

View File

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