inspect search bug

This commit is contained in:
mr 2025-01-17 11:05:08 +01:00
parent fb1b44e1d1
commit d44fb976e4

View File

@ -125,7 +125,7 @@ func genericLoadAll[T DBObject](res *mgb.Cursor, code int, err error, onlyDraft
return nil, 404, err
}
for _, r := range results {
fmt.Println(!r.VerifyAuth(a.GetRequest()), f(r), r.IsDrafted())
fmt.Println(!r.VerifyAuth(a.GetRequest()), f(r), (onlyDraft && !r.IsDrafted()) || (!onlyDraft && r.IsDrafted()), onlyDraft && !r.IsDrafted(), !onlyDraft && r.IsDrafted())
if !r.VerifyAuth(a.GetRequest()) || f(r) == nil || (onlyDraft && !r.IsDrafted()) || (!onlyDraft && r.IsDrafted()) {
continue
}