doableware / djongo

Django and MongoDB database connector
https://www.djongomapper.com
GNU Affero General Public License v3.0
1.86k stars 351 forks source link

Error with mobile connection #669

Closed pindasso closed 1 year ago

pindasso commented 1 year ago

One line description of the issue

This error is returned with connection mobile

Adjustment

adjustment in djongo/base.py line 208: ..... if self.connection is not None: ......

Traceback

File "/home/pina/Documents/Pyprojects/ecom/lib/python3.11/site-packages/djongo/base.py", line 208, in _close if self.connection: File "/home/pina/Documents/Pyprojects/ecom/lib/python3.11/site-packages/pymongo/database.py", line 1161, in bool raise NotImplementedError( NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None [25/May/2023 23:52:12] "GET /home/2/ HTTP/1.1" 500 59