From 6a43aeed1ea6afbd8cc3edd42c056b2c33feb66b Mon Sep 17 00:00:00 2001 From: 0ssigeno Date: Fri, 30 Aug 2024 09:22:36 +0200 Subject: [PATCH] Apparently the connection object must be checked with None instead of bool --- djongo/__init__.py | 2 +- djongo/base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/djongo/__init__.py b/djongo/__init__.py index f427914b..84507d5b 100644 --- a/djongo/__init__.py +++ b/djongo/__init__.py @@ -7,4 +7,4 @@ # * Renz Ladia # * thestick613 -__version__ = '1.3.14' +__version__ = '1.3.15' diff --git a/djongo/base.py b/djongo/base.py index d1d97b68..96580442 100644 --- a/djongo/base.py +++ b/djongo/base.py @@ -209,7 +209,7 @@ def create_cursor(self, name=None): """ Returns an active connection cursor to the database. """ - if not self.connection: + if self.connection is None: self.connection = self.get_new_connection(self.get_connection_params()) return Cursor(self.client_connection, self.connection, self.djongo_connection)