Fix id or username query handling
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
1 parent
6e76b72827
commit
031a1b8012
2 files changed
+8
-1
No files matched your search
@@ -230,7 +230,7 @@ func (s Service) findAccountsByQuery(ctx context.Context, query string) ([]strin
|
|||||||
qID, qSam := match[1], match[2]
|
qID, qSam := match[1], match[2]
|
||||||
tmp := &proto.Account{}
|
tmp := &proto.Account{}
|
||||||
err = s.repo.LoadAccount(ctx, qID, tmp)
|
err = s.repo.LoadAccount(ctx, qID, tmp)
|
||||||
if err != nil {
|
if err != nil && !storage.IsNotFoundErr(err) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
searchResults, err = s.index.FindBy(&proto.Account{}, "OnPremisesSamAccountName", qSam)
|
searchResults, err = s.index.FindBy(&proto.Account{}, "OnPremisesSamAccountName", qSam)
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in new issue
Block a user