From 9df75cd893cb4e9ab75b24eee3a1080b315135a2 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Mon, 27 May 2024 11:12:04 +0330 Subject: [PATCH] fix: getting latest token for google refresh! --- dags/hivemind_etl_helpers/src/utils/modules/modules_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dags/hivemind_etl_helpers/src/utils/modules/modules_base.py b/dags/hivemind_etl_helpers/src/utils/modules/modules_base.py index 5b2197f6..9829cef0 100644 --- a/dags/hivemind_etl_helpers/src/utils/modules/modules_base.py +++ b/dags/hivemind_etl_helpers/src/utils/modules/modules_base.py @@ -86,7 +86,7 @@ def get_token(self, platform_id: ObjectId, token_type: str) -> str: { "token": 1, }, - sort=[("createdAt", 1)], + sort=[("createdAt", -1)], ) if token_doc is None: raise ValueError(