Fix invoice view when there is no associated plan
This commit is contained in:
parent
b3e2d9a2a4
commit
95340eeb6e
2 changed files with 2 additions and 2 deletions
|
@ -1557,7 +1557,7 @@ def org_invoices_api(orgname):
|
|||
'attempted': i.attempted,
|
||||
'closed': i.closed,
|
||||
'total': i.total,
|
||||
'plan': i.lines.data[0].plan.id
|
||||
'plan': i.lines.data[0].plan.id if i.lines.data[0].plan else None
|
||||
}
|
||||
|
||||
permission = AdministerOrganizationPermission(orgname)
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
</dd>
|
||||
<dt>Plan</dt>
|
||||
<dd>
|
||||
<span>{{ plan_map[invoice.plan].title }}</span>
|
||||
<span>{{ invoice.plan ? plan_map[invoice.plan].title : '(N/A)' }}</span>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
|
|
Reference in a new issue