Update profiles.py

This commit is contained in:
Kumi 2021-11-12 13:11:04 +00:00
parent e19636c541
commit c368f71207

View file

@ -66,4 +66,5 @@ class ClientProfile(Profile):
main_client = ForeignKey("self", null=True, on_delete=SET_DEFAULT, default=None) main_client = ForeignKey("self", null=True, on_delete=SET_DEFAULT, default=None)
def __str__(self): def __str__(self):
return f"{self.company if self.company else ''}{' - ' if self.company and self.user.get_full_name else ''}{self.user.get_full_name if self.user.get_full_name else ''}" name = self.user.get_full_name()
return f"{self.company if self.company else ''}{' - ' if self.company and name else ''}{name if name else ''}"