From e4e7d93275c2306154704152e9ce1b06c3d5c282 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 17 Apr 2018 20:50:41 +0200 Subject: [PATCH] Fix flake8 errors --- datacenterlight/admin.py | 1 + utils/hosting_utils.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/datacenterlight/admin.py b/datacenterlight/admin.py index 3e5927e8..28adf28b 100644 --- a/datacenterlight/admin.py +++ b/datacenterlight/admin.py @@ -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) diff --git a/utils/hosting_utils.py b/utils/hosting_utils.py index 87b69534..c267cc0b 100644 --- a/utils/hosting_utils.py +++ b/utils/hosting_utils.py @@ -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)