From d0a17d7b7a70c74aee1f9e4764d2c701a3a987ca Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Fri, 13 Jan 2023 11:37:41 +0000 Subject: [PATCH] fix(tokens-repo): make json _get_stored_new_device_key return tz-aware keys --- .../repositories/tokens/json_tokens_repository.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/selfprivacy_api/repositories/tokens/json_tokens_repository.py b/selfprivacy_api/repositories/tokens/json_tokens_repository.py index 0f70a55..be753ea 100644 --- a/selfprivacy_api/repositories/tokens/json_tokens_repository.py +++ b/selfprivacy_api/repositories/tokens/json_tokens_repository.py @@ -143,7 +143,11 @@ class JsonTokensRepository(AbstractTokensRepository): new_device_key = NewDeviceKey( key=tokens_file["new_device"]["token"], - created_at=tokens_file["new_device"]["date"], - expires_at=tokens_file["new_device"]["expiration"], + created_at=self.__date_from_tokens_file( + tokens_file, "new_device", "date" + ), + expires_at=self.__date_from_tokens_file( + tokens_file, "new_device", "expiration" + ), ) return new_device_key