Fix flake8 errors
This commit is contained in:
parent
d15a4da840
commit
e4e7d93275
2 changed files with 4 additions and 3 deletions
|
@ -7,5 +7,6 @@ from .models import VMPricing
|
|||
class CMSIntegrationAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
|
||||
list_display = ('name', 'domain')
|
||||
|
||||
|
||||
admin.site.register(CMSIntegration, CMSIntegrationAdmin)
|
||||
admin.site.register(VMPricing)
|
||||
|
|
|
@ -74,9 +74,9 @@ def get_vm_price(cpu, memory, disk_size, hdd_size=0, pricing_name='default'):
|
|||
)
|
||||
return None
|
||||
price = ((decimal.Decimal(cpu) * pricing.cores_unit_price) +
|
||||
(decimal.Decimal(memory) * pricing.ram_unit_price) +
|
||||
(decimal.Decimal(disk_size) * pricing.ssd_unit_price) +
|
||||
(decimal.Decimal(hdd_size) * pricing.hdd_unit_price))
|
||||
(decimal.Decimal(memory) * pricing.ram_unit_price) +
|
||||
(decimal.Decimal(disk_size) * pricing.ssd_unit_price) +
|
||||
(decimal.Decimal(hdd_size) * pricing.hdd_unit_price))
|
||||
cents = decimal.Decimal('.01')
|
||||
price = price.quantize(cents, decimal.ROUND_HALF_UP)
|
||||
return float(price)
|
||||
|
|
Loading…
Reference in a new issue