From 9fee0e5c522a7060369e977267d490d5e25a4466 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 28 Oct 2024 16:04:42 +0300 Subject: [PATCH] Improve FullName helper --- pachca.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pachca.go b/pachca.go index 2c4f06b..f4dcc72 100644 --- a/pachca.go +++ b/pachca.go @@ -1671,12 +1671,8 @@ func (p *Property) Int() int { // FullName returns user full name func (u *User) FullName() string { - if u == nil { - return "" - } - switch { - case u == nil: + case u == nil, u.FirstName == "" && u.LastName == "": return "" case u.FirstName == "" && u.LastName != "": return u.LastName