|
@@ -64,12 +64,11 @@ class VoicePromptView(View):
|
|
|
uid = request_dict.get('uid', None)
|
|
|
channel = request_dict.get('channel', None)
|
|
|
type = request_dict.get('type', None)
|
|
|
- algorithm_type = request_dict.get('algorithmType', None)
|
|
|
+ algorithm_type = int(request_dict.get('algorithmType', 99))
|
|
|
|
|
|
if upload_type and uid and channel:
|
|
|
vp_qs = VoicePromptModel.objects.filter(uid=uid, channel=channel, type=type)
|
|
|
- if algorithm_type:
|
|
|
- vp_qs.filter(algorithm_type=int(algorithm_type))
|
|
|
+ vp_qs = vp_qs.filter(algorithm_type=algorithm_type)
|
|
|
count = vp_qs.count()
|
|
|
if count >= 3:
|
|
|
return response.json(201)
|
|
@@ -178,7 +177,7 @@ class VoicePromptView(View):
|
|
|
uid = request_dict.get('uid', None)
|
|
|
channel = request_dict.get('channel', None)
|
|
|
# 个性语音增加算法类型区分默认0兼容老版本
|
|
|
- algorithm_type = int(request_dict.get('algorithmType', 0))
|
|
|
+ algorithm_type = int(request_dict.get('algorithmType', 99))
|
|
|
|
|
|
if uid and channel and lang:
|
|
|
voice_qs = VoicePromptModel.objects.filter(uid=uid, channel=channel, classification=1,
|