Skip to content

Commit dde4289

Browse files
committed
fix: File upload is missing hash value
1 parent ca0034a commit dde4289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/knowledge/models/knowledge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def save(self, bytea=None, force_insert=False, force_update=False, using=None, u
346346
raise ValueError("bytea参数不能为空")
347347

348348
sha256_hash = get_sha256_hash(bytea)
349-
349+
self.sha256_hash = sha256_hash
350350
existing_file = QuerySet(File).filter(sha256_hash=sha256_hash).first()
351351
if existing_file:
352352
self.loid = existing_file.loid

0 commit comments

Comments
 (0)