Skip to content

Commit 60e3103

Browse files
CopilotZianTT
andauthored
Fix AttributeError: add hasattr guard for token_gen in do_order_create
Agent-Logs-Url: https://github.com/ZianTT/BHYG/sessions/8d23f390-c3be-4bdb-8e68-7418b519aeac Co-authored-by: ZianTT <53261506+ZianTT@users.noreply.github.com>
1 parent 446396d commit 60e3103

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ def do_order_create(self):
11711171
if self.config["hotProject"]:
11721172
data["ctoken"] = (
11731173
self.client.generate_ctoken(
1174-
timer=10 + 2 * int(time.time()) - 2 * int(self.token_gen)
1174+
timer=10 + 2 * int(time.time()) - 2 * int(self.token_gen if hasattr(self, "token_gen") else time.time())
11751175
)
11761176
if self.config.get("ctoken", "") == ""
11771177
else self.config.get("ctoken", "")

0 commit comments

Comments
 (0)