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")