returns empty array instead null
This commit is contained in:
parent
da481e9933
commit
f4046cb178
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ func NewAdmAccountStore(db *pg.DB) *AdmAccountStore {
|
||||||
|
|
||||||
// List applies a filter and returns paginated array of matching results and total count.
|
// 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) {
|
func (s *AdmAccountStore) List(f auth.AccountFilter) (*[]auth.Account, int, error) {
|
||||||
var a []auth.Account
|
a := []auth.Account{}
|
||||||
count, err := s.db.Model(&a).
|
count, err := s.db.Model(&a).
|
||||||
Apply(f.Filter).
|
Apply(f.Filter).
|
||||||
SelectAndCount()
|
SelectAndCount()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue