From cf23c3b5796e97dfbee71b33d42266db2ca41f56 Mon Sep 17 00:00:00 2001 From: Nikita Tokarchuk Date: Fri, 6 Mar 2020 00:20:09 +0100 Subject: [PATCH] Fix ctx bug --- mongox/database/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongox/database/database.go b/mongox/database/database.go index e780cc7..14019b0 100644 --- a/mongox/database/database.go +++ b/mongox/database/database.go @@ -45,7 +45,7 @@ func (d *Database) Name() string { // New function creates new database context with same client func (d *Database) New(ctx context.Context) mongox.Database { - if ctx != nil { + if ctx == nil { ctx = context.Background() }