forked from extern/django-helpdesk
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):
|
def get_assigned_to(self, obj):
|
||||||
if obj.assigned_to:
|
if obj.assigned_to:
|
||||||
if obj.assigned_to.first_name:
|
if obj.assigned_to.get_full_name():
|
||||||
return (obj.assigned_to.first_name)
|
return (obj.assigned_to.get_full_name())
|
||||||
else:
|
else:
|
||||||
return (obj.assigned_to.email)
|
return (obj.assigned_to.email)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user