Change nil check to len == 0 check for userRequest

pull/10616/head
Michael Desa 2017-11-01 12:38:26 -04:00
parent 46987558e0
commit 40feb4ae94
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ func (r *userRequest) ValidUpdate() error {
if r.Scheme != "" {
return fmt.Errorf("Cannot update Scheme")
}
if r.Roles == nil {
if len(r.Roles) == 0 {
return fmt.Errorf("No Roles to update")
}
return r.ValidRoles()