mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 09:23:39 +01:00
Added better support for custom user models by not requiring a first_name attribute
This commit is contained in:
parent
84456aca23
commit
377e1c3250
@ -46,8 +46,8 @@ class DatatablesTicketSerializer(serializers.ModelSerializer):
|
||||
|
||||
def get_assigned_to(self, obj):
|
||||
if obj.assigned_to:
|
||||
if obj.assigned_to.first_name:
|
||||
return (obj.assigned_to.first_name)
|
||||
if obj.assigned_to.get_full_name():
|
||||
return (obj.assigned_to.get_full_name())
|
||||
else:
|
||||
return (obj.assigned_to.email)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user