Fix empty last name bug

This commit is contained in:
Tanner Collin 2021-08-21 19:14:06 +00:00
parent aa5a01681f
commit fa36a1bec9

View File

@ -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):