Skip to content

Commit 5a38537

Browse files
QinYuuuuDev Agent
authored andcommitted
Fix missing of mirror current task (#694)
Co-authored-by: Dev Agent <dev-agent@example.com>
1 parent 6d5a23f commit 5a38537

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

builder/store/database/code.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ func (s *codeStoreImpl) FindByPath(ctx context.Context, namespace string, repoPa
169169
NewSelect().
170170
Model(resCode).
171171
Relation("Repository.User").
172+
Relation("Repository.Mirror").
173+
Relation("Repository.Mirror.CurrentTask").
172174
Where("repository.path =?", fmt.Sprintf("%s/%s", namespace, repoPath)).
173175
Scan(ctx)
174176
if err != nil {

builder/store/database/dataset.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ func (s *datasetStoreImpl) FindByPath(ctx context.Context, namespace string, rep
179179
Model(resDataset).
180180
Relation("Repository.User").
181181
Relation("Repository.Mirror").
182+
Relation("Repository.Mirror.CurrentTask").
182183
Where("repository.path =?", fmt.Sprintf("%s/%s", namespace, repoPath)).
183184
Scan(ctx)
184185
if err != nil {

builder/store/database/mcp_server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ func (m *mcpServerStoreImpl) ByPath(ctx context.Context, namespace string, name
102102
NewSelect().
103103
Model(mcpServer).
104104
Relation("Repository.User").
105+
Relation("Repository.Mirror").
106+
Relation("Repository.Mirror.CurrentTask").
105107
Where("repository.path = ?", fmt.Sprintf("%s/%s", namespace, name)).
106108
Scan(ctx)
107109
if err != nil {

0 commit comments

Comments
 (0)