dev@locazia: fix content encrypting

This commit is contained in:
user 2024-03-10 18:54:18 +03:00
parent dfb2ac7106
commit 28030b7ea9
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ async def create_encrypted_content(
db_session, decrypted_content: StoredContent, db_session, decrypted_content: StoredContent,
) -> StoredContent: ) -> StoredContent:
encrypted_content = db_session.query(StoredContent).filter( encrypted_content = db_session.query(StoredContent).filter(
StoredContent.id == decrypted_content.id StoredContent.id == decrypted_content.decrypted_content_id
).first() ).first()
if encrypted_content: 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") 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")