gnucash stable: Bug 799813 - gnucash-cli issue for price updates using Postgressql back-end

John Ralls jralls at code.gnucash.org
Tue Sep 22 19:01:15 EDT 2026


Updated	 via  https://github.com/Gnucash/gnucash/commit/cb304edf (commit)
	from  https://github.com/Gnucash/gnucash/commit/f488cf35 (commit)



commit cb304edfa6863f66bd6ff8df04721ff39aa29e72
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Sep 22 15:52:16 2026 -0700

    Bug 799813 - gnucash-cli issue for price updates using Postgressql back-end
    
    Reorder the CLI quotes get startup sequence to load GncQuotes before
    loading the session so that preconfigured quote sources don't null
    out other supported sources.
    
    Make the SQL backend create a new source when an unknown one is found in
    the commodities table like the XML backend does.
    
    Thanks to  Ganesh Suriyanarayanan for diagnosing the problem and
    proposing a solution.

diff --git a/libgnucash/backend/sql/gnc-commodity-sql.cpp b/libgnucash/backend/sql/gnc-commodity-sql.cpp
index 2792f09f8c..8e88f53623 100644
--- a/libgnucash/backend/sql/gnc-commodity-sql.cpp
+++ b/libgnucash/backend/sql/gnc-commodity-sql.cpp
@@ -116,6 +116,8 @@ set_quote_source_name (gpointer pObject, gpointer pValue)
 
     pCommodity = GNC_COMMODITY (pObject);
     quote_source = gnc_quote_source_lookup_by_internal (quote_source_name);
+    if (!quote_source)
+        quote_source = gnc_quote_source_add_new (quote_source_name, FALSE);
     gnc_commodity_set_quote_source (pCommodity, quote_source);
 }
 



Summary of changes:
 libgnucash/backend/sql/gnc-commodity-sql.cpp | 2 ++
 1 file changed, 2 insertions(+)



More information about the gnucash-changes mailing list