From 77736957ecfb06b3893b8673f964c75503b32f34 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sat, 12 Oct 2024 10:43:27 +0200 Subject: [PATCH] revert another unrelated change --- internal/db/bundb/bundb.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/db/bundb/bundb.go b/internal/db/bundb/bundb.go index 5ec51aa9c..e043c6dad 100644 --- a/internal/db/bundb/bundb.go +++ b/internal/db/bundb/bundb.go @@ -408,12 +408,13 @@ func maxOpenConns() int { // deriveBunDBPGOptions takes an application config and returns either a ready-to-use set of options // with sensible defaults, or an error if it's not satisfied by the provided config. func deriveBunDBPGOptions() (*pgx.ConnConfig, error) { - // If database URL is defined, ignore - // other DB-related configuration fields. - if url := config.GetDbPostgresConnectionString(); url != "" { - return pgx.ParseConfig(url) - } + url := config.GetDbPostgresConnectionString() + // if database URL is defined, ignore other DB related configuration fields + if url != "" { + cfg, err := pgx.ParseConfig(url) + return cfg, err + } // these are all optional, the db adapter figures out defaults address := config.GetDbAddress()