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