From 521b320d7b98960e76e2473ec8878a4a07fdd4bc Mon Sep 17 00:00:00 2001 From: Till Skrodzki Date: Sun, 31 Mar 2024 17:21:42 +0200 Subject: [PATCH] Place auth method with None check --- mapadroid/mitm_receiver/endpoints/AuthMethodEndpoint.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mapadroid/mitm_receiver/endpoints/AuthMethodEndpoint.py b/mapadroid/mitm_receiver/endpoints/AuthMethodEndpoint.py index 68a8c32af..68090000b 100644 --- a/mapadroid/mitm_receiver/endpoints/AuthMethodEndpoint.py +++ b/mapadroid/mitm_receiver/endpoints/AuthMethodEndpoint.py @@ -36,5 +36,7 @@ async def get(self): return self._json_response({}) currently_assigned: Optional[SettingsPogoauth] = await SettingsPogoauthHelper.get_assigned_to_device( session, device_entry.device_id) - response = {"method": currently_assigned.login_type} + + response = {"method": str(currently_assigned.login_type) if currently_assigned else ""} + logger.success("Instructing {} to use {}", origin, response["method"]) return self._json_response(response)