[WEB-4720] fix: mongo connection class to initialize mongo db #7652

This commit is contained in:
Nikhil 2025-08-28 13:57:16 +05:30 committed by GitHub
parent 0e6fbaee3a
commit ddeabeeeb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -118,4 +118,7 @@ class MongoConnection:
Returns:
bool: True if MongoDB is configured and connected, False otherwise
"""
if cls._client is None:
cls._instance = cls()
return cls._client is not None and cls._db is not None