Add string representations for profiles
This commit is contained in:
parent
b68475f813
commit
49e43ad24d
1 changed files with 6 additions and 0 deletions
|
@ -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 ''}"
|
Loading…
Reference in a new issue