Skip to content

Commit f1e6b5a

Browse files
committed
fix: update FileSerializer operation to use data dictionary for file ID
1 parent 7f09a22 commit f1e6b5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/knowledge/serializers/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ def download_source_file(self):
561561
file = QuerySet(File).filter(source_id=self.data.get('document_id')).first()
562562
if not file:
563563
raise AppApiException(500, _('file not exist'))
564-
return FileSerializer.Operate(id=file.id).get(with_valid=True)
564+
return FileSerializer.Operate(data={'id': file.id}).get(with_valid=True)
565565

566566
def one(self, with_valid=False):
567567
if with_valid:

0 commit comments

Comments
 (0)