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: