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()
|
file = QuerySet(File).filter(source_id=self.data.get('document_id')).first()
|
||||||
if not file:
|
if not file:
|
||||||
raise AppApiException(500, _('file not exist'))
|
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):
|
def one(self, with_valid=False):
|
||||||
if with_valid:
|
if with_valid:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user