yangxiaohui 1 年之前
父節點
當前提交
a3c06ced7e
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      ad_recommend.py

+ 3 - 2
ad_recommend.py

@@ -329,8 +329,9 @@ def predict_mid_video_res_with_model(now_date, mid, video_id, abtest_param, abte
                 care_model_status=care_model_status,
                 app_type=app_type
             )
-            hit_strategy = 'backup'
-            result['hit_strategy'] = hit_strategy
+            if result is not None:
+                hit_strategy = 'backup'
+                result['hit_strategy'] = hit_strategy
             return result
         else:
             if item_score is not None: