Fix invoice view when there is no associated plan

This commit is contained in:
Joseph Schorr 2013-12-04 14:32:55 -05:00
parent b3e2d9a2a4
commit 95340eeb6e
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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>