Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/application/serializers/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,6 @@ def edit(self, instance: Dict, with_valid=True):
if 'work_flow' in instance:
# 修改语音配置相关
self.update_work_flow_model(instance)
if application.type == ApplicationTypeChoices.SIMPLE.value:
application.is_publish = True
update_keys = ['name', 'desc', 'model_id', 'multiple_rounds_dialogue', 'prologue', 'status',
'knowledge_setting', 'model_setting', 'problem_optimization', 'dialogue_number',
'stt_model_id', 'tts_model_id', 'tts_model_enable', 'stt_model_enable', 'tts_type',
Expand Down
4 changes: 2 additions & 2 deletions apps/chat/serializers/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def is_valid_chat_id(self, chat_info: ChatInfo):
def is_valid_intraday_access_num(self):
if not self.data.get('debug') and [ChatUserType.ANONYMOUS_USER.value,
ChatUserType.CHAT_USER.value].__contains__(
self.data.get('chat_user_type')):
self.data.get('chat_user_type')):
access_client = QuerySet(ApplicationChatUserStats).filter(chat_user_id=self.data.get('chat_user_id'),
application_id=self.data.get(
'application_id')).first()
Expand Down Expand Up @@ -463,7 +463,7 @@ class TextToSpeechSerializers(serializers.Serializer):
def text_to_speech(self, instance):
self.is_valid(raise_exception=True)
application_id = self.data.get('application_id')
application = QuerySet(ApplicationVersion).filter(id=application_id).order_by('-create_time').first()
application = QuerySet(Application).filter(id=application_id).first()
return ApplicationOperateSerializer(
data={'application_id': application_id,
'user_id': application.user_id}).text_to_speech(instance, False)
Expand Down
Loading