Skip to content

Commit

Permalink
Merge pull request #745 from butonic/fix-id-or-username-query-handling
Browse files Browse the repository at this point in the history
Fix id or username query handling
  • Loading branch information
phil-davis authored Oct 23, 2020
2 parents 6e76b72 + 031a1b8 commit ea66c7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion accounts/pkg/service/v0/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (s Service) findAccountsByQuery(ctx context.Context, query string) ([]strin
qID, qSam := match[1], match[2]
tmp := &proto.Account{}
err = s.repo.LoadAccount(ctx, qID, tmp)
if err != nil {
if err != nil && !storage.IsNotFoundErr(err) {
return nil, err
}
searchResults, err = s.index.FindBy(&proto.Account{}, "OnPremisesSamAccountName", qSam)
Expand Down
7 changes: 7 additions & 0 deletions changelog/unreleased/fix-id-or-username-query-handling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Fix id or username query handling

Tags: accounts

The code was stopping execution when encountering an error while loading an account by id. But for or queries we can continue execution.

https://github.com/owncloud/ocis/pull/745

0 comments on commit ea66c7d

Please sign in to comment.