Why does not check for the existence of the record in the database Django?

I need to check who you are when you log in to your personal account. The code below does not work, tell me why? All records in the database have. Moreover, if I is username_temp will introduce in the code a specific phone number, then it works and displays my role in context.
def lk_point(request):
 context = {}
 username_temp = request.user.get_username
 context['username'] = username_temp
 if point.objects.filter(telephone=username_temp).exists():
 context['info'] = "You - point"
 elif client.objects.filter(telephone=username_temp).exists():
 context['info'] = "You - client"
 return render(request, 'lk_point.html', context)
April 19th 20 at 12:16
1 answer
April 19th 20 at 12:18
probably because request.user.get_username is a method and not a field value and it should cause

add parentheses for method calls that return the user name
username_temp = request.user.get_username()
Worked, thank you. I decided not to put them, because somewhere in previous code I have the brackets caused an error. Will consider - Delmer_Kovacek21 commented on April 19th 20 at 12:21

Find more questions by tags Django