From 2ff580209f635982d2116f84bab7ffd8440479ca Mon Sep 17 00:00:00 2001 From: ARYAN-NIKNEZHAD Date: Tue, 29 Oct 2024 01:08:59 +0330 Subject: [PATCH] fix(models): change str method to return name instead of customer_name Closes(#18) --- sage_invoice/models/customer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sage_invoice/models/customer.py b/sage_invoice/models/customer.py index 9981b7e..da9acfc 100644 --- a/sage_invoice/models/customer.py +++ b/sage_invoice/models/customer.py @@ -111,7 +111,7 @@ class CustomerProfile(models.Model): ) def __str__(self): - return f"{self.customer_name} ({self.company_name})" if self.company_name else self.customer_name + return f"{self.name} ({self.company_name})" if self.company_name else self.name class Meta: verbose_name = _("Customer Profile")