From 1ecc5eb89bfe2d1b3d3da4f16572e43f4a44b0c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Wed, 26 Jun 2024 12:17:24 +0200 Subject: [PATCH] Log when a partner user is unlinked (#2133) --- app/proton/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/proton/utils.py b/app/proton/utils.py index ed18ba4e..a75cd180 100644 --- a/app/proton/utils.py +++ b/app/proton/utils.py @@ -2,6 +2,7 @@ from newrelic import agent from typing import Optional from app.db import Session +from app.log import LOG from app.errors import ProtonPartnerNotSetUp from app.models import Partner, PartnerUser, User @@ -30,6 +31,7 @@ def perform_proton_account_unlink(current_user: User): user_id=current_user.id, partner_id=proton_partner.id ) if partner_user is not None: + LOG.info(f"User {current_user} has unlinked the account from {partner_user}") PartnerUser.delete(partner_user.id) Session.commit() agent.record_custom_event("AccountUnlinked", {"partner": proton_partner.name})