Check if bot is configured before trying to get username in bridge info provisioning API

This commit is contained in:
Tulir Asokan
2019-04-24 16:42:28 +03:00
parent 1df87447bd
commit fce22b08e9
@@ -365,7 +365,7 @@ class ProvisioningAPI(AuthAPI):
async def bridge_info(self, request: web.Request) -> web.Response:
return web.json_response({
"relaybot_username": self.context.bot.username,
"relaybot_username": self.context.bot.username if self.context.bot is not None else None,
}, status=200)
@staticmethod