fiks 'ny klandring' cancel-funktionen
This commit is contained in:
parent
789d8ef7a0
commit
c522bbfb4c
|
@ -126,7 +126,6 @@ def menu_klandringer():
|
||||||
menu_klandringer()
|
menu_klandringer()
|
||||||
|
|
||||||
def menu_select_klandring():
|
def menu_select_klandring():
|
||||||
print(klandringer)
|
|
||||||
klandringer_entries = [(str(i),k["klandrer"] + " v. " + k["klandret"] + " - " + k["title"]) for i,k in enumerate(klandringer)]
|
klandringer_entries = [(str(i),k["klandrer"] + " v. " + k["klandret"] + " - " + k["title"]) for i,k in enumerate(klandringer)]
|
||||||
code, tag = d.menu("Vælg den klandring du vil ændre/slette",
|
code, tag = d.menu("Vælg den klandring du vil ændre/slette",
|
||||||
title="Vælg klandring",
|
title="Vælg klandring",
|
||||||
|
@ -135,10 +134,11 @@ def menu_select_klandring():
|
||||||
return tag
|
return tag
|
||||||
|
|
||||||
def create_klandring():
|
def create_klandring():
|
||||||
print(klandringer)
|
|
||||||
klandringer.append({"klandrer":"","klandret":"","title":"","description":"","taber":""})
|
klandringer.append({"klandrer":"","klandret":"","title":"","description":"","taber":""})
|
||||||
return edit_klandring(-1)
|
code = edit_klandring(-1)
|
||||||
|
if code != d.OK:
|
||||||
|
del klandringer[-1]
|
||||||
|
return code
|
||||||
|
|
||||||
def edit_klandring(strid):
|
def edit_klandring(strid):
|
||||||
id = int(strid)
|
id = int(strid)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user