From 28030b7ea9aaffc6ce772637f762e404fe40b92d Mon Sep 17 00:00:00 2001 From: user Date: Sun, 10 Mar 2024 18:54:18 +0300 Subject: [PATCH] dev@locazia: fix content encrypting --- app/core/_crypto/content.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/core/_crypto/content.py b/app/core/_crypto/content.py index 63fdf13..b779ce1 100644 --- a/app/core/_crypto/content.py +++ b/app/core/_crypto/content.py @@ -46,7 +46,7 @@ async def create_encrypted_content( db_session, decrypted_content: StoredContent, ) -> StoredContent: encrypted_content = db_session.query(StoredContent).filter( - StoredContent.id == decrypted_content.id + StoredContent.id == decrypted_content.decrypted_content_id ).first() if encrypted_content: make_log("create_encrypted_content", f"(d={decrypted_content.cid.serialize_v2()}) => (e={encrypted_content.cid.serialize_v2()}): already exist (found by decrypted content)", level="debug")