mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-26 23:35:51 +03:00
Fix test
There was a panic when there's no logged in user
This commit is contained in:
parent
dc2b28ed76
commit
8906b2891b
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ func Search(ctx *context.APIContext) {
|
||||||
OwnerID: ctx.QueryInt64("uid"),
|
OwnerID: ctx.QueryInt64("uid"),
|
||||||
PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
|
PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
|
||||||
}
|
}
|
||||||
if ctx.User.ID == opts.OwnerID {
|
if ctx.User != nil && ctx.User.ID == opts.OwnerID {
|
||||||
opts.Searcher = ctx.User
|
opts.Searcher = ctx.User
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue