diff --git a/core/models/profiles.py b/core/models/profiles.py index 1c0e3b0..9924ccb 100644 --- a/core/models/profiles.py +++ b/core/models/profiles.py @@ -45,6 +45,9 @@ class AdminProfile(Profile): else: self.permission_string = ",".join(permissions) + def __str__(self): + return self.get_internal_name + class ClientProfile(Profile): company = LongCharField(null=True, blank=True) address1 = LongCharField() @@ -61,3 +64,6 @@ class ClientProfile(Profile): marketing_opt_in = DateTimeField(null=True) pgp_key = TextField(null=True) main_client = ForeignKey("self", null=True, on_delete=SET_DEFAULT, default=None) + + 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 ''}" \ No newline at end of file