Skip to content

Commit 4dafe7b

Browse files
committed
fix: Unable to play voice after publishing
1 parent 925a9b0 commit 4dafe7b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

apps/application/serializers/application.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,6 @@ def edit(self, instance: Dict, with_valid=True):
800800
if 'work_flow' in instance:
801801
# 修改语音配置相关
802802
self.update_work_flow_model(instance)
803-
if application.type == ApplicationTypeChoices.SIMPLE.value:
804-
application.is_publish = True
805803
update_keys = ['name', 'desc', 'model_id', 'multiple_rounds_dialogue', 'prologue', 'status',
806804
'knowledge_setting', 'model_setting', 'problem_optimization', 'dialogue_number',
807805
'stt_model_id', 'tts_model_id', 'tts_model_enable', 'stt_model_enable', 'tts_type',

apps/chat/serializers/chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def is_valid_chat_id(self, chat_info: ChatInfo):
192192
def is_valid_intraday_access_num(self):
193193
if not self.data.get('debug') and [ChatUserType.ANONYMOUS_USER.value,
194194
ChatUserType.CHAT_USER.value].__contains__(
195-
self.data.get('chat_user_type')):
195+
self.data.get('chat_user_type')):
196196
access_client = QuerySet(ApplicationChatUserStats).filter(chat_user_id=self.data.get('chat_user_id'),
197197
application_id=self.data.get(
198198
'application_id')).first()
@@ -463,7 +463,7 @@ class TextToSpeechSerializers(serializers.Serializer):
463463
def text_to_speech(self, instance):
464464
self.is_valid(raise_exception=True)
465465
application_id = self.data.get('application_id')
466-
application = QuerySet(ApplicationVersion).filter(id=application_id).order_by('-create_time').first()
466+
application = QuerySet(Application).filter(id=application_id).first()
467467
return ApplicationOperateSerializer(
468468
data={'application_id': application_id,
469469
'user_id': application.user_id}).text_to_speech(instance, False)

0 commit comments

Comments
 (0)