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

Method is_valid

apps/chat/serializers/chat.py:540–548  ·  view source on GitHub ↗
(self, *, raise_exception=False)

Source from the content-addressed store, hash-verified

538 source = serializers.JSONField(required=False, label=_("Source"))
539
540 def is_valid(self, *, raise_exception=False):
541 super().is_valid(raise_exception=True)
542 workspace_id = self.data.get('workspace_id')
543 application_id = self.data.get('application_id')
544 query_set = QuerySet(Application).filter(id=application_id)
545 if workspace_id:
546 query_set = query_set.filter(workspace_id=workspace_id)
547 if not query_set.exists():
548 raise AppApiException(500, gettext('Application does not exist'))
549
550 def open(self):
551 self.is_valid(raise_exception=True)

Callers 15

openMethod · 0.95
open_work_flowMethod · 0.95
authMethod · 0.45
profileMethod · 0.45
profileMethod · 0.45
is_validMethod · 0.45
chatMethod · 0.45
is_validMethod · 0.45
generate_promptMethod · 0.45
generate_chatMethod · 0.45
chatMethod · 0.45
chatMethod · 0.45

Calls 2

AppApiExceptionClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected