Cannot cast int to an object

This commit is contained in:
Jeremy Zhang 2018-01-23 22:50:11 +00:00
parent 56a3527152
commit becc65a2da

View File

@ -161,7 +161,7 @@ class DatabaseInterface(object):
dbmember = session.query(GuildMembers) \ dbmember = session.query(GuildMembers) \
.filter(GuildMembers.guild_id == int(member.server.id)) \ .filter(GuildMembers.guild_id == int(member.server.id)) \
.filter(GuildMembers.user_id == int(member.id)) \ .filter(GuildMembers.user_id == int(member.id)) \
.order_by(int(GuildMembers.id)).all() .order_by(GuildMembers.id).all()
if not dbmember: if not dbmember:
dbmember = GuildMembers( dbmember = GuildMembers(
int(member.server.id), int(member.server.id),