mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: replace get_byte() with get_bytes() for consistency in file handling
This commit is contained in:
parent
758f424000
commit
73ee9bf602
|
|
@ -559,6 +559,8 @@ class DocumentSerializers(serializers.Serializer):
|
|||
def download_source_file(self):
|
||||
self.is_valid(raise_exception=True)
|
||||
file = QuerySet(File).filter(source_id=self.data.get('document_id')).first()
|
||||
if not file:
|
||||
raise AppApiException(500, _('file not exist'))
|
||||
return FileSerializer.Operate(id=file.id).get(with_valid=True)
|
||||
|
||||
def one(self, with_valid=False):
|
||||
|
|
|
|||
Loading…
Reference in New Issue