mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-22 10:44:25 +08:00
add unit tests and improve robustness
This commit is contained in:
@@ -140,6 +140,11 @@ func (e *CzechNationalBankDataSource) parseExchangeRate(c core.Context, line str
|
||||
return nil
|
||||
}
|
||||
|
||||
if amount <= 0 {
|
||||
log.Warnf(c, "[czech_national_bank_datasource.parseExchangeRate] amount is invalid, line is %s", line)
|
||||
return nil
|
||||
}
|
||||
|
||||
rate, err := utils.StringToFloat64(items[rateColumnIndex])
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user