From 363cf43cc932ef0bf132f6e621e0f0c1aa9e74b2 Mon Sep 17 00:00:00 2001 From: Jason Syrotuck Date: Thu, 26 Oct 2023 15:26:49 -0700 Subject: [PATCH] [FIX] - row level auth and invitations hybrid property (#2756) --- services/core-api/app/api/parties/party/models/party.py | 3 +-- .../resources/verifiable_credential_webhook.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/services/core-api/app/api/parties/party/models/party.py b/services/core-api/app/api/parties/party/models/party.py index 4ed501a047..332e4a9a45 100644 --- a/services/core-api/app/api/parties/party/models/party.py +++ b/services/core-api/app/api/parties/party/models/party.py @@ -115,8 +115,7 @@ def business_roles_codes(self): @hybrid_property def digital_wallet_connection_status(self): - current_app.logger.warning(self.digital_wallet_invitations) - dwi = [i for i in self.digital_wallet_invitations if i.connection_status] # filter empty conn_state + dwi = [i for i in self.digital_wallet_invitations if i.connection_state] # filter empty conn_state if dwi: current_app.logger.warning(dwi) return dwi.connection_state # active >> invitation diff --git a/services/core-api/app/api/verifiable_credentials/resources/verifiable_credential_webhook.py b/services/core-api/app/api/verifiable_credentials/resources/verifiable_credential_webhook.py index a0f247c343..fe1bd5949f 100644 --- a/services/core-api/app/api/verifiable_credentials/resources/verifiable_credential_webhook.py +++ b/services/core-api/app/api/verifiable_credentials/resources/verifiable_credential_webhook.py @@ -1,6 +1,7 @@ import enum from flask import current_app, request from flask_restplus import Resource +from app.api.utils.include.user_info import User from app.extensions import api @@ -18,6 +19,7 @@ class VerifiableCredentialWebhookResource(Resource, UserMixin): @api.doc(description='Endpoint to recieve webhooks from Traction.', params={}) def post(self, topic): + User._test_mode = True #webhook handling has no row level auth webhook_body = request.get_json() current_app.logger.warning(f"TRACTION WEBHOOK : {webhook_body}") if topic == CONNECTIONS: