From 10d2c25556ca6138107267a063cdf1ee17994cef Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 16 Feb 2024 16:23:02 +0530 Subject: [PATCH] Get product name from id it starts with generic otherwise use as is --- datacenterlight/templatetags/custom_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/templatetags/custom_tags.py b/datacenterlight/templatetags/custom_tags.py index 120cabbf..5d0c01b3 100644 --- a/datacenterlight/templatetags/custom_tags.py +++ b/datacenterlight/templatetags/custom_tags.py @@ -144,7 +144,7 @@ def get_line_item_from_stripe_invoice(invoice): """.format( vm_id=vm_id if vm_id > 0 else "", ip_addresses=mark_safe(get_ip_addresses(vm_id)) if vm_id > 0 else - mark_safe(get_product_name(plan_name)), + mark_safe(get_product_name(plan_name)) if plan_name.startswith("generic-") else plan_name, period=mark_safe("%s — %s" % ( datetime.datetime.fromtimestamp(start_date).strftime('%Y-%m-%d'), datetime.datetime.fromtimestamp(end_date).strftime('%Y-%m-%d'))),