(self, *, raise_exception=False)
| 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 | |
| 156 | class DocumentEditInstanceSerializer(serializers.Serializer): |