소스 검색

修改过滤逻辑2

罗俊辉 10 달 전
부모
커밋
56d79cfecf
2개의 변경된 파일15개의 추가작업 그리고 15개의 파일을 삭제
  1. 6 6
      routes/AccountArticleRank.py
  2. 9 9
      test/rank_dev.py

+ 6 - 6
routes/AccountArticleRank.py

@@ -162,12 +162,12 @@ class AccountArticleRank(object):
         else:
             ranked_1 = []
         # rank2
-        # if article_list2_ori:
-        #     for item in article_list2_ori:
-        #         item['score'] = 100
-        #     ranked_2 = sorted(article_list2_ori, key=lambda x: x['crawlerViewCount'], reverse=True)
-        # else:
-        ranked_2 = []
+        if article_list2_ori:
+            for item in article_list2_ori:
+                item['score'] = 100
+            ranked_2 = sorted(article_list2_ori, key=lambda x: x['crawlerViewCount'], reverse=True)
+        else:
+            ranked_2 = []
 
         # rank3
         if article_list3_ori:

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 9 - 9
test/rank_dev.py


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.