yangxiaohui 1 anno fa
parent
commit
a3c06ced7e
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  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: