1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Bugfix in call.get_author for telegram bots

This commit is contained in:
Steffo 2019-04-09 12:41:42 +02:00
parent 8f7fe39c27
commit 85c0d717da

View file

@ -82,7 +82,10 @@ class TelegramBot:
for link in self.identity_chain: for link in self.identity_chain:
query = query.join(link.mapper.class_) query = query.join(link.mapper.class_)
query = query.filter(self.identity_column == user.id) query = query.filter(self.identity_column == user.id)
return await asyncify(query.one_or_none) result = await asyncify(query.one_or_none)
if result is None and error_if_none:
raise UnregisteredError("Author is not registered!")
return result
self.TelegramCall = TelegramCall self.TelegramCall = TelegramCall