Fix panic in PropDef.GetValue for person
property types. (#2218)
* Fixed panic in PropDef.GetValue for `person` property types. - the GetUserByID API can return a nil user and nil error * return userid
This commit is contained in:
parent
5030b1e582
commit
46801d72cb
1 changed files with 3 additions and 0 deletions
|
@ -91,6 +91,9 @@ func (pd PropDef) GetValue(v interface{}, resolver PropValueResolver) (string, e
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
if user == nil {
|
||||||
|
return userID, nil
|
||||||
|
}
|
||||||
return user.Username, nil
|
return user.Username, nil
|
||||||
}
|
}
|
||||||
return userID, nil
|
return userID, nil
|
||||||
|
|
Loading…
Reference in a new issue