In case of error, log it and return empty result
This commit is contained in:
parent
73cb003353
commit
52362cd0ea
1 changed files with 22 additions and 18 deletions
|
@ -72,6 +72,7 @@ def get_line_item_from_hosting_order_charge(hosting_order_id):
|
|||
:param hosting_order_id: the HostingOrder id
|
||||
:return:
|
||||
"""
|
||||
try:
|
||||
hosting_order = HostingOrder.objects.get(id = hosting_order_id)
|
||||
if hosting_order.stripe_charge_id:
|
||||
return mark_safe("""
|
||||
|
@ -92,6 +93,9 @@ def get_line_item_from_hosting_order_charge(hosting_order_id):
|
|||
))
|
||||
else:
|
||||
return ""
|
||||
except Exception as ex:
|
||||
logger.error("Error %s" % str(ex))
|
||||
return ""
|
||||
|
||||
|
||||
@register.filter('get_line_item_from_stripe_invoice')
|
||||
|
|
Loading…
Reference in a new issue