Skip to content

Commit c53ca58

Browse files
authored
Merge branch 'staging' into list-share
2 parents c91a5cb + 928d77d commit c53ca58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

code/go/0chain.net/blobbercore/stats/filestats.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ func FileBlockDownloaded(ctx context.Context, refID int64) {
6969
func GetFileStats(ctx context.Context, refID int64) (*FileStats, error) {
7070
db := datastore.GetStore().GetTransaction(ctx)
7171
stats := &FileStats{RefID: refID}
72-
err := db.Model(stats).Where(FileStats{RefID: refID}).First(stats).Error
72+
err := db.Model(stats).Where(FileStats{RefID: refID}).Preload("Ref").First(stats).Error
7373
if err != nil {
7474
return nil, err
7575
}
76+
7677
return stats, err
7778
}
7879

0 commit comments

Comments
 (0)