fix: Document upload prompt: missing status list field (#1991)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
shaohuzhang1 2025-01-07 18:21:13 +08:00 committed by GitHub
parent 923c75512b
commit 8db35c45c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -700,7 +700,11 @@ class DocumentSerializers(ApiMixin, serializers.Serializer):
_document.save()
return self.one()
def refresh(self, state_list, with_valid=True):
def refresh(self, state_list=None, with_valid=True):
if state_list is None:
state_list = [State.PENDING.value, State.STARTED.value, State.SUCCESS.value, State.FAILURE.value,
State.REVOKE.value,
State.REVOKED.value, State.IGNORED.value]
if with_valid:
self.is_valid(raise_exception=True)
document_id = self.data.get("document_id")