diff --git a/apps/dataset/serializers/document_serializers.py b/apps/dataset/serializers/document_serializers.py index 3d24c01e6f3..33b0838baf1 100644 --- a/apps/dataset/serializers/document_serializers.py +++ b/apps/dataset/serializers/document_serializers.py @@ -700,7 +700,11 @@ def edit(self, instance: Dict, with_valid=False): _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")