Browse Source

Merge branch 'special-mid' into pre-master

liqian 2 years ago
parent
commit
a11420c82f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      recommend.py

+ 1 - 1
recommend.py

@@ -817,7 +817,7 @@ def special_mid_recommend(request_id, mid, uid, app_type, size,
         idx += get_size
 
     # 将此次获取的末位视频id同步刷新到Redis中,方便下次快速定位到召回位置,过期时间为1天
-    if mid:
+    if mid and recall_result:
         # mid为空时,不做记录
         redis_helper.set_data_to_redis(key_name=last_special_recall_key,
                                        value=recall_result[:size][-1]['videoId'],