From fc51084f8939772c905db69b84307e0a05218089 Mon Sep 17 00:00:00 2001 From: Thonyk Date: Wed, 15 Jan 2025 03:58:36 +0100 Subject: [PATCH] Fix: device activation log --- app/core/myeclpay/endpoints_myeclpay.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/core/myeclpay/endpoints_myeclpay.py b/app/core/myeclpay/endpoints_myeclpay.py index ebd758614..8146422dc 100644 --- a/app/core/myeclpay/endpoints_myeclpay.py +++ b/app/core/myeclpay/endpoints_myeclpay.py @@ -1330,9 +1330,11 @@ async def activate_user_device( detail="Wallet does not exist", ) - hyperion_error_logger.info( - f"Wallet device {wallet_device.id} activated by user {wallet.user}", - ) + user = wallet.user + if user is not None: + hyperion_error_logger.info( + f"Wallet device {wallet_device.id} activated by user {user.id}", + ) return "Wallet device activated"