Merge branch 'feature/6561/show-multiple-line-items'

This commit is contained in:
PCoder 2019-04-20 19:14:41 +02:00
commit 212648a1c5

View file

@ -513,10 +513,12 @@ class HostingBillLineItem(AssignPermissionsMixin, models.Model):
vm_conf = StripeUtils.get_vm_config_from_stripe_id( vm_conf = StripeUtils.get_vm_config_from_stripe_id(
self.stripe_plan.stripe_plan_id self.stripe_plan.stripe_plan_id
) )
item_detail += ("<b>Cores</b>: {}<br/><b>RAM</b>: {} GB<br/>" if vm_conf is not None:
"<b>SSD</b>: {} GB<br/>").format( item_detail += ("<b>Cores</b>: {}<br/><b>RAM</b>: {} GB<br/>"
vm_conf['cores'], int(float(vm_conf['ram'])), vm_conf['ssd'] "<b>SSD</b>: {} GB<br/>").format(
) vm_conf['cores'], int(float(vm_conf['ram'])),
vm_conf['ssd']
)
return item_detail return item_detail
class VMDetail(models.Model): class VMDetail(models.Model):