Correct the way we get periods for invoices list
This commit is contained in:
parent
965cc3adf9
commit
1ccb4e9790
3 changed files with 10 additions and 8 deletions
|
|
@ -500,7 +500,8 @@ class HostingBillLineItem(AssignPermissionsMixin, models.Model):
|
|||
:return:
|
||||
"""
|
||||
item_detail = ""
|
||||
if self.metadata is not None and len(self.metadata) > 0:
|
||||
# metadata is a dict; a dict with nothing has two chars at least {}
|
||||
if self.metadata is not None and len(self.metadata) > 2:
|
||||
try:
|
||||
vm_dict = json.loads(self.metadata)
|
||||
item_detail = "VM ID: {}<br/>".format(vm_dict["VM_ID"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue