diff --git a/hosting/migrations/0037_merge.py b/hosting/migrations/0037_merge.py new file mode 100644 index 00000000..091a16c5 --- /dev/null +++ b/hosting/migrations/0037_merge.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2017-05-07 04:49 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('hosting', '0031_hostingbill_total_price'), + ('hosting', '0036_auto_20170506_2312'), + ] + + operations = [ + ] diff --git a/hosting/models.py b/hosting/models.py index e48f2f4b..63bf8654 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -4,6 +4,7 @@ import oca from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.functional import cached_property +from django.conf import settings from Crypto.PublicKey import RSA from stored_messages.settings import stored_messages_settings @@ -293,7 +294,7 @@ class HostingBill(AssignPermissionsMixin, models.Model): # Reset total price self.total_price = 0 - vms = [] + vms = [] # Add vm in vm_pool to context for vm in vm_pool: name = vm.name @@ -319,6 +320,6 @@ class HostingBill(AssignPermissionsMixin, models.Model): self.total_price += price self.save() - return vms + return vms