|
@@ -427,7 +427,7 @@ class UidSetView(View):
|
|
end_time = request_dict.get('end_time', None)
|
|
end_time = request_dict.get('end_time', None)
|
|
repeat_day = request_dict.get('repeat_day', None)
|
|
repeat_day = request_dict.get('repeat_day', None)
|
|
direction = request_dict.get('direction', None)
|
|
direction = request_dict.get('direction', None)
|
|
- algorithm_type = request_dict.get('algorithmType', None)
|
|
|
|
|
|
+ algorithm_type = int(request_dict.get('algorithmType', 0))
|
|
|
|
|
|
if uid and channel:
|
|
if uid and channel:
|
|
channel = int(channel)
|
|
channel = int(channel)
|
|
@@ -459,12 +459,10 @@ class UidSetView(View):
|
|
ucs['voice_repeat_day'] = repeat_day
|
|
ucs['voice_repeat_day'] = repeat_day
|
|
if direction:
|
|
if direction:
|
|
ucs['voice_direction'] = direction
|
|
ucs['voice_direction'] = direction
|
|
- if algorithm_type:
|
|
|
|
- ucs['algorithm_type'] = int(algorithm_type)
|
|
|
|
|
|
+ ucs['algorithm_type'] = algorithm_type
|
|
|
|
|
|
uid_channel_set_qs = UidChannelSetModel.objects.filter(uid__uid=uid, channel=channel)
|
|
uid_channel_set_qs = UidChannelSetModel.objects.filter(uid__uid=uid, channel=channel)
|
|
- if algorithm_type: # 算法类型
|
|
|
|
- uid_channel_set_qs.filter(algorithm_type=int(algorithm_type))
|
|
|
|
|
|
+ uid_channel_set_qs = uid_channel_set_qs.filter(algorithm_type=algorithm_type)
|
|
if not uid_channel_set_qs.exists():
|
|
if not uid_channel_set_qs.exists():
|
|
uidObject = UidSetModel.objects.filter(uid=uid)
|
|
uidObject = UidSetModel.objects.filter(uid=uid)
|
|
ucs['channel'] = channel
|
|
ucs['channel'] = channel
|