From f4046cb178b3ea33d9f0a1919ad350586370a9a5 Mon Sep 17 00:00:00 2001 From: dhax Date: Wed, 11 Oct 2017 12:35:00 +0200 Subject: [PATCH] returns empty array instead null --- database/admAccountStore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/admAccountStore.go b/database/admAccountStore.go index 5840fe9..c0325ea 100644 --- a/database/admAccountStore.go +++ b/database/admAccountStore.go @@ -27,7 +27,7 @@ func NewAdmAccountStore(db *pg.DB) *AdmAccountStore { // List applies a filter and returns paginated array of matching results and total count. func (s *AdmAccountStore) List(f auth.AccountFilter) (*[]auth.Account, int, error) { - var a []auth.Account + a := []auth.Account{} count, err := s.db.Model(&a). Apply(f.Filter). SelectAndCount()