diff --git a/pkg/database/dao/subject_template_group.go b/pkg/database/dao/subject_template_group.go index 6ed3471a..315f9f67 100644 --- a/pkg/database/dao/subject_template_group.go +++ b/pkg/database/dao/subject_template_group.go @@ -238,6 +238,10 @@ func (m *subjectTemplateGroupManager) ListThinRelationWithMaxExpiredAtByGroupPK( } func (m *subjectTemplateGroupManager) BulkDeleteBySubjectPKsWithTx(tx *sqlx.Tx, subjectPKs []int64) error { + if len(subjectPKs) == 0 { + return nil + } + sql := `DELETE FROM subject_template_group WHERE subject_pk in (?)` return database.SqlxDeleteWithTx(tx, sql, subjectPKs)