remove entries for users no longer found on pnut.io
This commit is contained in:
parent
b0ad45e935
commit
2a05edf78d
1 changed files with 7 additions and 1 deletions
|
@ -159,7 +159,13 @@ def karma(room):
|
|||
reply += user.username + ": " + str(entry.karma) + "\n"
|
||||
|
||||
except pnutpy.errors.PnutMissing:
|
||||
continue
|
||||
del_karma = Karma.query.filter(Karma.userid == entry.userid).one_or_none()
|
||||
if del_karma:
|
||||
db_session.delete(del_karma)
|
||||
del_counter = MdnpRequests.query.filter(MdnpRequests.userid == entry.userid).one_or_none()
|
||||
if del_counter:
|
||||
db_session.delete(del_counter)
|
||||
db_session.commit()
|
||||
send(room, reply)
|
||||
|
||||
def chimpnut(msg):
|
||||
|
|
Loading…
Reference in a new issue