aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/main.py
diff options
context:
space:
mode:
authorBonfaceKilz2020-12-23 16:38:43 +0300
committerBonfaceKilz2020-12-23 16:38:43 +0300
commit1b351c9ad469014350d8abb092e33c9e3215805d (patch)
tree493ccac1070c81f21b70b4c085102e23436569f6 /bh20simplewebuploader/main.py
parent6e060269c8eef4bde87291770c3fa26726c4a1a1 (diff)
downloadbh20-seq-resource-1b351c9ad469014350d8abb092e33c9e3215805d.tar.gz
bh20-seq-resource-1b351c9ad469014350d8abb092e33c9e3215805d.tar.lz
bh20-seq-resource-1b351c9ad469014350d8abb092e33c9e3215805d.zip
Order tweets in the feed by highest score
Diffstat (limited to 'bh20simplewebuploader/main.py')
-rw-r--r--bh20simplewebuploader/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py
index d697918..31d1b1f 100644
--- a/bh20simplewebuploader/main.py
+++ b/bh20simplewebuploader/main.py
@@ -263,7 +263,7 @@ def send_home():
# Ensure the dict always has a value; otherwise a key
# error will be thrown by jinja
tweet_dict = redis_client.hgetall(tweet_id)
- if tweet_dict:
+ if tweet_dict and int(tweet_dict.get(b'score', "0")) > 0:
tweets.append(
{k.decode("utf-8"): v.decode("utf-8") for k, v in
tweet_dict.items()})