about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bh20simplewebuploader/main.py2
-rw-r--r--bh20simplewebuploader/templates/home.html2
2 files changed, 2 insertions, 2 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()})
diff --git a/bh20simplewebuploader/templates/home.html b/bh20simplewebuploader/templates/home.html
index 8a9c27b..b1e52be 100644
--- a/bh20simplewebuploader/templates/home.html
+++ b/bh20simplewebuploader/templates/home.html
@@ -39,7 +39,7 @@
                               Pubmed content
                           </ul>
                           <ul class="tab content-tweets">
-                              {% for tweet in tweets|sort(reverse=true, attribute="timeposted")%}
+                              {% for tweet in tweets|sort(reverse=true, attribute="score")%}
                               <li>
                                   <p class="tweet">
                                       {{ tweet.tweet|urlize(40, target="_blank") }} <br/>