diff --git a/backend/src/appointment/database/repo.py b/backend/src/appointment/database/repo.py index 0c1b2a249..a9fad0fdf 100644 --- a/backend/src/appointment/database/repo.py +++ b/backend/src/appointment/database/repo.py @@ -636,4 +636,7 @@ def get_subscriber_by_fxa_uid(db: Session, type_id: str): result = query.first() - return result + if result is not None: + return result.owner + + return None diff --git a/backend/src/appointment/routes/webhooks.py b/backend/src/appointment/routes/webhooks.py index 603cd242c..5d649e799 100644 --- a/backend/src/appointment/routes/webhooks.py +++ b/backend/src/appointment/routes/webhooks.py @@ -15,7 +15,7 @@ def fxa_process( request: Request, db: Session = Depends(get_db), - decoded_token: dict = Depends(get_webhook_auth), + decoded_token = Depends(get_webhook_auth), fxa_client: FxaClient = Depends(get_fxa_client) ): """Main for webhooks regarding fxa"""