From 809b852ce4b3d34009ba7b29bca12fb377ec481e Mon Sep 17 00:00:00 2001 From: Trim21 Date: Tue, 10 Dec 2024 23:25:05 +0800 Subject: [PATCH] set type to 0 on delete --- internal/collections/infra/mysql_repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/collections/infra/mysql_repo.go b/internal/collections/infra/mysql_repo.go index 204920c4..ac09d6f0 100644 --- a/internal/collections/infra/mysql_repo.go +++ b/internal/collections/infra/mysql_repo.go @@ -128,7 +128,7 @@ func (r mysqlRepo) DeleteSubjectCollection( ) error { _, err := r.q.SubjectCollection.WithContext(ctx). Where(r.q.SubjectCollection.UserID.Eq(userID), r.q.SubjectCollection.SubjectID.Eq(subjectID)). - Delete() + UpdateSimple(r.q.SubjectCollection.Type.Value(0)) return err }