From 92e8ba6cfc77d3d98756462597370e48b6c2d1df Mon Sep 17 00:00:00 2001 From: Khai Tran Date: Mon, 3 Jun 2024 15:41:53 +0700 Subject: [PATCH] chore: Update cipher history data --- locker_server/api_orm/model_parsers/cipher_parsers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locker_server/api_orm/model_parsers/cipher_parsers.py b/locker_server/api_orm/model_parsers/cipher_parsers.py index a51e661..d29beba 100644 --- a/locker_server/api_orm/model_parsers/cipher_parsers.py +++ b/locker_server/api_orm/model_parsers/cipher_parsers.py @@ -6,6 +6,7 @@ from locker_server.core.entities.cipher.cipher import Cipher from locker_server.core.entities.cipher.cipher_history import CipherHistory from locker_server.core.entities.cipher.folder import Folder +from locker_server.shared.utils.app import convert_readable_date class CipherParser: @@ -56,7 +57,7 @@ def parse_password_history(cls, cipher_orm: CipherORM) -> List: data = history_orm.get("data") data = {} if not data else ast.literal_eval(str(data)) history.append({ - "last_use_date": history_orm.get("last_use_date"), + "last_use_date": convert_readable_date(history_orm.get("last_use_date")), "password": data.get("password") }) return history