fix syntax error in user lookups issue #37
This commit is contained in:
parent
c9be0256e4
commit
a95c3df51a
1 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@ def save_cb(room, event):
|
|||
|
||||
def drop_cb(room, event):
|
||||
try:
|
||||
user = Users.query.filter(Users.matrix_id=event['sender']).one_or_none()
|
||||
user = Users.query.filter(Users.matrix_id == event['sender']).one_or_none()
|
||||
if user is not None:
|
||||
db_session.delete(user)
|
||||
db_session.commit()
|
||||
|
@ -79,7 +79,7 @@ def drop_cb(room, event):
|
|||
|
||||
def status_cb(room, event):
|
||||
try:
|
||||
user = Users.query.filter(Users.matrix_id=event['sender']).one_or_none()
|
||||
user = Users.query.filter(Users.matrix_id == event['sender']).one_or_none()
|
||||
if user is None:
|
||||
reply = "You are currently not authorized on pnut.io"
|
||||
else:
|
||||
|
@ -99,7 +99,7 @@ def status_cb(room, event):
|
|||
|
||||
if __name__ == "__main__":
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
with open("config.yaml", "rb") as config_file:
|
||||
config = yaml.load(config_file)
|
||||
|
|
Loading…
Reference in a new issue