Skip to content

Commit

Permalink
Place auth method with None check
Browse files Browse the repository at this point in the history
  • Loading branch information
Grennith committed Mar 31, 2024
1 parent af0e1ea commit 521b320
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mapadroid/mitm_receiver/endpoints/AuthMethodEndpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 521b320

Please sign in to comment.