Skip to content

Commit

Permalink
🐛 fix crash on user.members without init (#1871)
Browse files Browse the repository at this point in the history
Cannot request values from the list if we fail to initialize it in the firt place.

Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus authored Sep 24, 2023
1 parent 1529818 commit 7f90f75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/os/resources/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func (x *mqlGroup) members() ([]interface{}, error) {
}
users := raw.(*mqlUsers)

if err := users.refreshCache(nil); err != nil {
return nil, err
}

res := make([]interface{}, len(x.membersArr))
for i, name := range x.membersArr {
res[i] = users.usersByName[name]
Expand Down

0 comments on commit 7f90f75

Please sign in to comment.