From bacc2767c75c1d531f5f643feb158ff16f6da943 Mon Sep 17 00:00:00 2001 From: Trim21 Date: Tue, 30 Jan 2024 16:51:49 +0800 Subject: [PATCH] fix: subjects of indices --- internal/index/mysql_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/index/mysql_repository.go b/internal/index/mysql_repository.go index 22eddcb45..5e9672788 100644 --- a/internal/index/mysql_repository.go +++ b/internal/index/mysql_repository.go @@ -126,7 +126,7 @@ func (r mysqlRepo) ListSubjects( ) ([]Subject, error) { q := r.q.IndexSubject.WithContext(ctx).Joins(r.q.IndexSubject.Subject). Preload(r.q.IndexSubject.Subject.Fields). - Where(r.q.IndexSubject.IndexID.Eq(id)). + Where(r.q.IndexSubject.IndexID.Eq(id), r.q.IndexSubject.Cat.Eq(0)). Order(r.q.IndexSubject.Order). Limit(limit).Offset(offset) if subjectType != 0 {