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

Method is_valid

apps/knowledge/serializers/document.py:147–153  ·  view source on GitHub ↗
(self, *, raise_exception=False)

Source from the content-addressed store, hash-verified

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 15

is_validMethod · 0.45
is_validMethod · 0.45
is_validMethod · 0.45
exportMethod · 0.45
table_exportMethod · 0.45
is_validMethod · 0.45
is_validMethod · 0.45
is_validMethod · 0.45
editMethod · 0.45
cancelMethod · 0.45
is_validMethod · 0.45
saveMethod · 0.45

Calls 3

TaskTypeClass · 0.90
AppApiExceptionClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected