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

Fix bug with get_author on discord

This commit is contained in:
Steffo 2019-10-25 13:39:13 +02:00
parent 7d93cd2827
commit 9cafd17b16

View file

@ -56,7 +56,7 @@ class DiscordBot(GenericBot):
async def get_author(data, error_if_none=False): async def get_author(data, error_if_none=False):
user: discord.Member = data.message.author user: discord.Member = data.message.author
query = data._interface.session.query(self.master_table) query = data.session.query(self.master_table)
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)