From ea16f46bc9b77e46c0b64506e9d7e7069569f88c Mon Sep 17 00:00:00 2001 From: Nikhil Date: Wed, 10 Apr 2024 20:39:51 -0700 Subject: [PATCH] get token --- catalystwan/api/admin_tech_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalystwan/api/admin_tech_api.py b/catalystwan/api/admin_tech_api.py index 17b14d74..13464083 100644 --- a/catalystwan/api/admin_tech_api.py +++ b/catalystwan/api/admin_tech_api.py @@ -146,7 +146,7 @@ def _wait_for_file_ready(self, filename: str, timeout: int = 3600, interval: int def _get_token_id(self, filename: str) -> str: admin_techs = self.get_all() for admin_tech in admin_techs: - if filename == admin_tech.filename: + if filename == admin_tech.filename and admin_tech.state == "done": return admin_tech.token_id raise RequestTokenIdNotFound( f"requestTokenId of admin tech generation request not found for file name: {filename}"