diff options
Diffstat (limited to 'src/FundLab.Api/App.fs')
| -rw-r--r-- | src/FundLab.Api/App.fs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/FundLab.Api/App.fs b/src/FundLab.Api/App.fs index ac4c174..4ae00de 100644 --- a/src/FundLab.Api/App.fs +++ b/src/FundLab.Api/App.fs @@ -544,7 +544,12 @@ module App = | Some code, Some percentText -> match tryDecimal "targetPercent" percentText with | Ok percent -> - let targetRow: RebalancePolicy.TargetAllocation = { InstrumentCode = code; TargetPercent = percent } + let targetRow: RebalancePolicy.TargetAllocation = + { + RebalancePolicy.TargetAllocation.InstrumentCode = code + TargetPercent = percent + } + rows.Add(targetRow) | Error message -> failure <- Some message | _ -> failure <- Some "each target needs instrumentCode and targetPercent" |
