mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798533 - Crash when importing quicken @ currency
Ensure that guess-by-symbol returns GNC_COMMODITY_NS_NONCURRENCY if there's no previously loaded matching security with a namespace.
This commit is contained in:
parent
559d581cf7
commit
b218926e0b
@ -745,12 +745,14 @@
|
||||
(or (string-ci=? qif-type "stock")
|
||||
(string-ci=? qif-type "etf")
|
||||
(string-ci=? qif-type "mutual fund")
|
||||
(string-ci=? qif-type "index")
|
||||
))))
|
||||
(string-ci=? qif-type "index"))))))
|
||||
prefs)
|
||||
#f))))
|
||||
;; If a preferences match was found, use its namespace.
|
||||
(if pref-match (cadr pref-match)))
|
||||
#f)))
|
||||
;; If a preferences match was found, use its namespace,
|
||||
;; otherwise the default non-currency namespace.
|
||||
(if pref-match
|
||||
(cadr pref-match)
|
||||
(GNC-COMMODITY-NS-NONCURRENCY)))
|
||||
;; There's no symbol. Use the built-in default.
|
||||
(GNC-COMMODITY-NS-NONCURRENCY)))
|
||||
|
||||
@ -815,6 +817,7 @@
|
||||
(set! qif-symbol security-name))
|
||||
|
||||
;; Create the new security and add it to the hash table.
|
||||
|
||||
(hash-set! security-hash
|
||||
security-name
|
||||
(gnc-commodity-new book
|
||||
|
Loading…
Reference in New Issue
Block a user