Skip to content

Commit

Permalink
Add error log for missconfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
0ssigeno committed Dec 11, 2023
1 parent 9302a25 commit 1132afa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion djongo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# * Renz Ladia
# * thestick613

__version__ = '1.3.12'
__version__ = '1.3.13'
2 changes: 2 additions & 0 deletions djongo/sql2mongo/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ def _needs_column_selection(self):
return not(self.distinct or self.groupby) and self.selected_columns

def _get_cursor(self):
if self.db is None:
logger.error("YOUR DB CONNECTION IS CLOSED. Please add health_checks + no expire")
if self._needs_aggregation():
pipeline = self._make_pipeline()
cur = self.db[self.left_table].aggregate(pipeline)
Expand Down

0 comments on commit 1132afa

Please sign in to comment.