1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
There was a panic when there's no logged in user
This commit is contained in:
Andrey Nering 2017-05-18 14:35:06 -03:00
parent dc2b28ed76
commit 8906b2891b

View file

@ -33,7 +33,7 @@ func Search(ctx *context.APIContext) {
OwnerID: ctx.QueryInt64("uid"),
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
}