mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: update FileSerializer operation to use data dictionary for file ID
This commit is contained in:
parent
7f09a22518
commit
f1e6b5adec
|
|
@ -561,7 +561,7 @@ class DocumentSerializers(serializers.Serializer):
|
|||
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)
|
||||
return FileSerializer.Operate(data={'id': file.id}).get(with_valid=True)
|
||||
|
||||
def one(self, with_valid=False):
|
||||
if with_valid:
|
||||
|
|
|
|||
Loading…
Reference in New Issue