fix: retain stock identities in research and AI task lists
This commit is contained in:
@@ -21,6 +21,13 @@ const backtestColumns = `id,strategy_version_id,status,input,input_hash,result,f
|
||||
func scanBacktest(row pgx.Row) (model.BacktestRun, error) {
|
||||
var v model.BacktestRun
|
||||
err := row.Scan(&v.ID, &v.StrategyVersionID, &v.Status, &v.Input, &v.InputHash, &v.Result, &v.Failure, &v.LeaseID, &v.CreatedAt, &v.FinishedAt)
|
||||
if err == nil {
|
||||
var identity struct {
|
||||
Symbol string `json:"symbol"`
|
||||
}
|
||||
err = json.Unmarshal(v.Input, &identity)
|
||||
v.Symbol = identity.Symbol
|
||||
}
|
||||
return v, mapError(err)
|
||||
}
|
||||
func (r *BacktestRepository) Detail(ctx context.Context, id string) (model.BacktestRun, error) {
|
||||
|
||||
Reference in New Issue
Block a user