From b09bf688b43f9707ce6bd67031aeee835e5dd457 Mon Sep 17 00:00:00 2001 From: Game_Time <108236317+RayBytes@users.noreply.github.com> Date: Thu, 17 Aug 2023 16:13:20 +0500 Subject: [PATCH] Update stats.py with env mongodb --- api/db/stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/db/stats.py b/api/db/stats.py index 4fe7c56..1317a05 100644 --- a/api/db/stats.py +++ b/api/db/stats.py @@ -26,7 +26,7 @@ class StatsManager: self.conn = AsyncIOMotorClient(os.getenv('MONGO_URI')) async def _get_collection(self, collection_name: str): - return self.conn['nova-core'][collection_name] + return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name] async def add_date(self): date = datetime.datetime.now(pytz.timezone('GMT')).strftime('%Y.%m.%d')