Skip to content

Commit

Permalink
Fixed panic
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Jun 14, 2023
1 parent 43b4669 commit 60d5217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ocm/share/repository/nextcloud/nextcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,10 @@ func (sm *Manager) UpdateReceivedShare(ctx context.Context, user *userpb.User, s
}

func getUsername(user *userpb.User) string {
if len(user.Username) > 0 {
if user != nil && len(user.Username) > 0 {
return user.Username
}
if len(user.Id.OpaqueId) > 0 {
if user != nil && len(user.Id.OpaqueId) > 0 {
return user.Id.OpaqueId
}

Expand Down

0 comments on commit 60d5217

Please sign in to comment.