Server: Disable start position check if start_pos_delta_max is 0

This commit is contained in:
Arthur Golubtsov
2020-02-12 20:43:51 +03:00
parent 20c2fc22c8
commit addcdbb78b
2 changed files with 6 additions and 0 deletions

View File

@@ -128,6 +128,10 @@ def check_time_delta(item):
@ModelChecks.column_check("start_position", pass_context=True)
def check_start_pos(item, context):
if ModelChecks.start_pos_delta_max == 0:
return True
if context.current_position is None:
return item != 'NO_POS' # maybe should return true

View File

@@ -50,10 +50,12 @@ def restart(): # move to core
os.chdir(startup_cwd)
os.execv(sys.executable, args)
def update_server():
subprocess.call("git fetch && git pull --rebase", shell=True)
restart()
def confirmation_required(text="Are you sure?", label="Confirm operation?"):
def inner(f):
@wraps(f)