Fix empty last name bug
This commit is contained in:
parent
aa5a01681f
commit
fa36a1bec9
|
@ -119,7 +119,10 @@ class OtherMemberSerializer(serializers.ModelSerializer):
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_last_name(self, obj):
|
def get_last_name(self, obj):
|
||||||
|
if len(obj.last_name):
|
||||||
return obj.last_name[0] + '.'
|
return obj.last_name[0] + '.'
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
# vetted member viewing other members
|
# vetted member viewing other members
|
||||||
class VettedOtherMemberSerializer(serializers.ModelSerializer):
|
class VettedOtherMemberSerializer(serializers.ModelSerializer):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user