liqian hace 2 años
padre
commit
04d708129f
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      video_rank.py

+ 2 - 0
video_rank.py

@@ -267,6 +267,8 @@ def bottom_strategy2(size, app_type, mid, uid, ab_code, client_info, params):
     redis_helper = RedisHelper(params=params)
     bottom_data = redis_helper.get_data_from_set(key_name=config_.BOTTOM2_KEY_NAME)
     bottom_result = []
+    if bottom_data is None:
+        return bottom_result
     if len(bottom_data) > 0:
         try:
             random_data = numpy.random.choice(bottom_data, size * 5, False)