Skip to content

Commit e4ccf8d

Browse files
committed
(fix): fixed inconsistenicies in the code and removed debug statements
Signed-off-by: Kannav02 <[email protected]>
1 parent afd2259 commit e4ccf8d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

common/mongoClient.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99
feedback_collection_name = "feedback"
1010
context_collection_name = "context"
1111

12-
print(os.getenv("MONGO_DB_URI"))
13-
14-
15-
def get_mongo_client() -> Database:
12+
def get_mongo_db_client() -> Database:
1613
"""
1714
Get the MongoDB client.
1815
1916
Returns:
20-
- MongoClient: The MongoDB client.
17+
- DatabaseClient: The Database client.
2118
2219
Note:
2320
MongoDB doesn't create a collection or a database until it gets content, so no need to check if the data already exists or not.
@@ -149,5 +146,6 @@ def create_collection(collection_name:str,client_database:Database,validator:obj
149146
except Exception as e:
150147
print(f"Failed to create collection: {e}")
151148
return None
152-
153-
submit_feedback()
149+
150+
if __name__ == "__main__":
151+
submit_feedback()

0 commit comments

Comments
 (0)