Skip to content

Commit

Permalink
Fix id or username query handling
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Oct 23, 2020
1 parent 7eb7703 commit 6de314b
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 6de314b

Please sign in to comment.