handle new empty database on startup
This commit is contained in:
parent
d103a31df3
commit
2a1e384034
1 changed files with 2 additions and 1 deletions
|
@ -185,7 +185,8 @@ class ChannelMonitor(threading.Thread):
|
|||
logging.info("-- Starting channel monitor --")
|
||||
app.app_context().push()
|
||||
rooms = MatrixRoom2.query.all()
|
||||
self.txId = int(rooms[0].pnut_since)
|
||||
if rooms:
|
||||
self.txId = int(rooms[0].pnut_since)
|
||||
while not _shutdown.isSet():
|
||||
rooms = MatrixRoom2.query.all()
|
||||
for r in rooms:
|
||||
|
|
Loading…
Reference in a new issue