@@ -16,18 +16,18 @@ func (s *PostgresBenchmarkStore) CreateBenchmark(ctx context.Context, b *types.B
1616 return types.Benchmark {}, errors .New ("service error: benchmark struct cannot be nil, valid benchmark data is required" )
1717 }
1818
19- var rebalance_threshold_pct int = b .Rebalance_threshold_pct
20- if b .Rebalance_threshold_pct == 0 {
21- rebalance_threshold_pct = constants .BENCHMARK_REBALANCE_PCT_DEFAULT
19+ var rec_rebalance_threshold_pct int = b .Rec_rebalance_threshold_pct
20+ if b .Rec_rebalance_threshold_pct == 0 {
21+ rec_rebalance_threshold_pct = constants .BENCHMARK_REBALANCE_PCT_DEFAULT
2222 }
2323
2424 row := s .db .QueryRow (
2525 c ,
2626 `INSERT INTO benchmarks
27- (name, description, asset_allocation, std_dev_pct, real_return_pct, drawdown_yrs, is_deprecated, user_id, rebalance_threshold_pct )
27+ (name, description, asset_allocation, std_dev_pct, real_return_pct, drawdown_yrs, is_deprecated, user_id, rec_rebalance_threshold_pct )
2828 VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
2929 RETURNING *` ,
30- b .Name , b .Description , b .Asset_allocation , b .Std_dev_pct , b .Real_return_pct , b .Drawdown_yrs , b .Is_deprecated , b .User_id , rebalance_threshold_pct ,
30+ b .Name , b .Description , b .Asset_allocation , b .Std_dev_pct , b .Real_return_pct , b .Drawdown_yrs , b .Is_deprecated , b .User_id , rec_rebalance_threshold_pct ,
3131 )
3232
3333 benchmark , err := s .parseRowIntoBenchmark (row )
0 commit comments