From af1c1b3797181025e36a827e2ad7fea989ff199b Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 6 Oct 2021 10:02:14 +0200 Subject: [PATCH] Fixes per lists.sr.ht updates --- hubsrht/blueprints/trackers.py | 2 +- hubsrht/blueprints/webhooks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hubsrht/blueprints/trackers.py b/hubsrht/blueprints/trackers.py index 0bd51ed..02e78e3 100644 --- a/hubsrht/blueprints/trackers.py +++ b/hubsrht/blueprints/trackers.py @@ -89,7 +89,7 @@ def new_POST(owner, project_name): tracker.owner_id = owner.id tracker.name = remote_tracker["name"] tracker.description = remote_tracker["description"] - if any(remote_tracker["default_permissions"]["anonymous"]): + if any(remote_tracker["default_access"]: tracker.visibility = Visibility.public else: tracker.visibility = Visibility.unlisted diff --git a/hubsrht/blueprints/webhooks.py b/hubsrht/blueprints/webhooks.py index b93c45b..2b655e2 100644 --- a/hubsrht/blueprints/webhooks.py +++ b/hubsrht/blueprints/webhooks.py @@ -220,7 +220,7 @@ def todo_user(user_id): for tracker in trackers: tracker.name = payload["name"] tracker.description = payload["description"] - if any(payload["default_permissions"]["anonymous"]): + if any(payload["default_access"]): tracker.visibility = Visibility.public else: tracker.visibility = Visibility.unlisted