From fc6f7fc67a2b95ba21f51290e71d852c1e5c0267 Mon Sep 17 00:00:00 2001 From: kristiankralovic Date: Wed, 4 Dec 2024 11:49:10 +0100 Subject: [PATCH] Fix token handling if in memory storege is used --- mergadoapiclient/storage.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mergadoapiclient/storage.py b/mergadoapiclient/storage.py index 4467a46..54a2b21 100644 --- a/mergadoapiclient/storage.py +++ b/mergadoapiclient/storage.py @@ -28,5 +28,8 @@ def load(self): """Loads storage instance. Default implementation stores the token in memory and does nothing else. """ + if not hasattr(self, 'token'): + return + if self.token and self.token_is_valid: return self