]> rtime.felk.cvut.cz Git - hubacji1/coffee-getter.git/commitdiff
Merge branch 'hotfix/0.4.3-stats-for-3-plus-people-only'
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 21 Jan 2020 15:50:24 +0000 (16:50 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 21 Jan 2020 15:50:24 +0000 (16:50 +0100)
CHANGELOG.md
run/top5_mate_stats.py

index c62e8fa6ac010856094459ea6e2dbe20cce7b28e..6e59e2a5347488a1e25f097b44bf0adf971bcd35 100644 (file)
@@ -9,6 +9,10 @@ The format is based on [Keep a Changelog][] and this project adheres to
 
 ## Unreleased
 
+### 0.4.3 - 2020-01-21
+### Fixed
+- Show stats on Slack only if enough (more than 3) people in stats.
+
 ## 0.4.2 - 2020-01-06
 ### Fixed
 - Reset top equal list when computing top drinkers.
index 0a30d674253b22b4b05f43bab7ec88d14281f667..2cb6503373dcd5bf3ad34caef05a155f12c83212 100755 (executable)
@@ -6,8 +6,8 @@ from cbgetter import CoffeebotGetter
 if __name__ == "__main__":
     g = CoffeebotGetter()
     g.loadTopMateDrinkers()
-    g.sendMsgToSlack()
+    if len(g.top) > 3:
+        g.sendMsgToSlack()
     g.load_top_tea_drinkers()
-    g.sendMsgToSlack()
-    g.load_top_drinks()
-    g.sendMsgToSlack()
+    if len(g.top) > 3:
+        g.sendMsgToSlack()