MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / CancelInstanceSerializer

Class CancelInstanceSerializer

apps/knowledge/serializers/document.py:144–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142
143
144class CancelInstanceSerializer(serializers.Serializer):
145 type = serializers.IntegerField(required=True, label=_("task type"))
146
147 def is_valid(self, *, raise_exception=False):
148 super().is_valid(raise_exception=True)
149 _type = self.data.get("type")
150 try:
151 TaskType(_type)
152 except Exception as e:
153 raise AppApiException(500, _("task type not support"))
154
155
156class DocumentEditInstanceSerializer(serializers.Serializer):

Callers 1

cancelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected