mirror of
https://github.com/aclindsa/ofxgo.git
synced 2024-11-22 03:30:04 -05:00
cmd/ofx: check for nil Currency fields in transactions
This commit is contained in:
parent
cb48d30deb
commit
67fa945cc8
@ -77,7 +77,7 @@ func bankTransactions() {
|
||||
|
||||
func printTransaction(defCurrency ofxgo.CurrSymbol, tran *ofxgo.Transaction) {
|
||||
currency := defCurrency
|
||||
if ok, _ := tran.Currency.Valid(); ok {
|
||||
if tran.Currency != nil {
|
||||
currency = tran.Currency.CurSym
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ func ccTransactions() {
|
||||
fmt.Println("Transactions:")
|
||||
for _, tran := range stmt.BankTranList.Transactions {
|
||||
currency := stmt.CurDef
|
||||
if ok, _ := tran.Currency.Valid(); ok {
|
||||
if tran.Currency != nil {
|
||||
currency = tran.Currency.CurSym
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user