add default triggerpattern

This commit is contained in:
Thomas L 2018-04-14 17:31:53 +02:00
parent 034513718f
commit 22de5e7e4e

4
db.py
View file

@ -126,6 +126,10 @@ class DB(object):
self.execute("INSERT INTO user (passhash) VALUES(?);",
(json['passhash'], ))
uid = self.cur.lastrowid
self.execute("""
INSERT INTO triggerpatterns (user_id, pattern)
VALUES(?, ?);
""", (uid, '.*'))
else:
uid = json['uid']
self.execute("INSERT INTO email (user_id, email) VALUES(?, ?);",