From de9a075f04b24afea517daeaf4486a68e855fc5c Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 22 Jul 2020 17:25:59 +0200 Subject: [PATCH] modified headers access in clockify --- pype/modules/clockify/clockify_api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pype/modules/clockify/clockify_api.py b/pype/modules/clockify/clockify_api.py index 8ebed302fe..a8eefe13a4 100644 --- a/pype/modules/clockify/clockify_api.py +++ b/pype/modules/clockify/clockify_api.py @@ -11,7 +11,11 @@ class ClockifyAPI: self.workspace_name = workspace_name self.master_parent = master_parent self.workspace_id = None - self.headers = {"X-Api-Key": api_key} + self.api_key = api_key + + @property + def headers(self): + return {"X-Api-Key": self.api_key} def verify_api(self): for key, value in self.headers.items(): @@ -24,7 +28,7 @@ class ClockifyAPI: api_key = self.get_api_key() if api_key is not None and self.validate_api_key(api_key) is True: - self.headers["X-Api-Key"] = api_key + self.api_key = api_key self.set_workspace() if self.master_parent: self.master_parent.signed_in()