Save null seed to settings

This commit is contained in:
Henk 2022-08-14 02:09:53 +02:00
parent c453643e2c
commit 6acccbf7a4
2 changed files with 6 additions and 2 deletions

View File

@ -1038,6 +1038,8 @@ def savesettings():
if(vars.seed_specified): if(vars.seed_specified):
js["seed"] = vars.seed js["seed"] = vars.seed
else:
js["seed"] = None
js["newlinemode"] = vars.newlinemode js["newlinemode"] = vars.newlinemode
@ -1153,9 +1155,12 @@ def processsettings(js):
if("seed" in js): if("seed" in js):
vars.seed = js["seed"] vars.seed = js["seed"]
if(vars.seed is not None):
vars.seed_specified = True vars.seed_specified = True
else: else:
vars.seed_specified = False vars.seed_specified = False
else:
vars.seed_specified = False
if("antemplate" in js): if("antemplate" in js):
vars.setauthornotetemplate = js["antemplate"] vars.setauthornotetemplate = js["antemplate"]

View File

@ -175,7 +175,6 @@ def num_layers(config):
from flask_socketio import emit from flask_socketio import emit
class Send_to_socketio(object): class Send_to_socketio(object):
def write(self, bar): def write(self, bar):
print("should be emitting: ", bar, end="")
time.sleep(0.01) time.sleep(0.01)
try: try:
emit('from_server', {'cmd': 'model_load_status', 'data': bar.replace(" ", " ")}, broadcast=True) emit('from_server', {'cmd': 'model_load_status', 'data': bar.replace(" ", " ")}, broadcast=True)