diff --git a/klandr.py b/klandr.py index 592b488..d4c0d69 100755 --- a/klandr.py +++ b/klandr.py @@ -126,7 +126,6 @@ def menu_klandringer(): menu_klandringer() def menu_select_klandring(): - print(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", title="Vælg klandring", @@ -135,10 +134,11 @@ def menu_select_klandring(): return tag def create_klandring(): - print(klandringer) 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): id = int(strid)