Skip to content

Commit

Permalink
Improve FullName helper
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Oct 28, 2024
1 parent 5e38d0f commit 9fee0e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pachca.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9fee0e5

Please sign in to comment.