From 2924ccd23b5c59eb2167faa261c9115faa3fe4b7 Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 3 Dec 2024 09:25:27 +0100 Subject: [PATCH] debug --- models/utils/abstracts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/utils/abstracts.go b/models/utils/abstracts.go index 496340e..8f8f0a8 100644 --- a/models/utils/abstracts.go +++ b/models/utils/abstracts.go @@ -204,7 +204,7 @@ func GenericLoadOne[T DBObject](id string, f func(DBObject) (DBObject, int, erro func genericLoadAll[T DBObject](res *mgb.Cursor, code int, err error, f func(DBObject) ShallowDBObject, a Accessor) ([]ShallowDBObject, int, error) { objs := []ShallowDBObject{} - results := []T{} + var results []T if err != nil { a.GetLogger().Error().Msg("Could not retrieve any from db. Error: " + err.Error()) return nil, code, err