From 0c3e1ab4e67396f87867e8a6e808e2b136508ff7 Mon Sep 17 00:00:00 2001 From: ThomasTNO <49478940+ThomasTNO@users.noreply.github.com> Date: Mon, 28 Feb 2022 14:59:05 +0100 Subject: [PATCH] Use count to determine whether there is new data --- github_traffic_stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_traffic_stats.py b/github_traffic_stats.py index a89d4b7..260a3bc 100644 --- a/github_traffic_stats.py +++ b/github_traffic_stats.py @@ -33,7 +33,7 @@ def collect(user, repo, token, org): found_new_data = True else: db_data = json.loads(db.get(timestamp)) - if db_data['uniques'] < data['uniques']: + if db_data['count'] < data['count']: db.set(timestamp, json.dumps(data)) print(timestamp, data) found_new_data = True