diff --git a/worldbuild-manager.py b/worldbuild-manager.py index 94b211f..01f1df6 100755 --- a/worldbuild-manager.py +++ b/worldbuild-manager.py @@ -96,6 +96,8 @@ def set_state(name, status): sid = cursor.fetchone() sql = "UPDATE tile SET status_id = " + str(sid[0]) + " WHERE parent_id = " + str(pid[0]) cursor.execute(sql) + sql = "UPDATE secondLevel SET status_id = " + str(sid[0]) + " WHERE name = '" + name + "'" + cursor.execute(sql) else: sql = "UPDATE tile SET status_id = (SELECT id FROM status WHERE name = '" + status + "') WHERE id = " + name cursor.execute(sql) @@ -114,6 +116,7 @@ try: msg = msg.decode() db.ping(reconnect=True) + db.commit() match = re.match(r"(set) ([ew]\d{3}[ns]\d{2}|[0-9]{1,7}) (done|started|rebuild|skip|pending|packaged)", msg) if match != None: