Fix ctx bug

This commit is contained in:
Nikita Tokarchuk
2020-03-06 00:20:09 +01:00
parent f3adfb039a
commit cf23c3b579
+1 -1
View File
@@ -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()
}