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

Method open

apps/chat/serializers/chat.py:550–564  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

548 raise AppApiException(500, gettext('Application does not exist'))
549
550 def open(self):
551 self.is_valid(raise_exception=True)
552 application_id = self.data.get('application_id')
553 application = QuerySet(Application).get(id=application_id)
554 debug = self.data.get("debug")
555 if not debug:
556 application_version = QuerySet(ApplicationVersion).filter(application_id=application_id).order_by(
557 '-create_time')[0:1].first()
558 if application_version is None:
559 raise AppApiException(500,
560 _("The application has not been published. Please use it after publishing."))
561 if application.type == ApplicationTypeChoices.SIMPLE:
562 return self.open_simple(application)
563 else:
564 return self.open_work_flow(application)
565
566 def open_work_flow(self, application):
567 self.is_valid(raise_exception=True)

Callers 10

is_validMethod · 0.45
getMethod · 0.45
_get_chat_idMethod · 0.45
read_wav_infoFunction · 0.45
getMethod · 0.45
init_sandbox_dirMethod · 0.45
xlsx_embed_cells_imagesFunction · 0.45
handleMethod · 0.45
handleMethod · 0.45
get_contentMethod · 0.45

Calls 5

is_validMethod · 0.95
open_simpleMethod · 0.95
open_work_flowMethod · 0.95
AppApiExceptionClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected