Flagen Hintergrund Styling
This commit is contained in:
parent
661c703dd7
commit
916553ad47
3 changed files with 8 additions and 7 deletions
4
app.py
4
app.py
|
|
@ -249,12 +249,14 @@ def loeschen():
|
|||
except TypeError:
|
||||
return "Irgendwas ist GANZ falsch", 400
|
||||
try:
|
||||
with open(dateiNameFürListe(liste), "x") as f:
|
||||
with open(dateiNameFürListe(liste), "r+") as f:
|
||||
songs = json.load(f)
|
||||
if len(songs) < song + 1:
|
||||
return "Das Lied Gibt es Nicht", 400
|
||||
del songs[song]
|
||||
f.seek(0)
|
||||
json.dump(songs, f, indent=2, ensure_ascii=False)
|
||||
f.truncate()
|
||||
return redirect("/remove?liste=" + liste, 303)
|
||||
except FileNotFoundError:
|
||||
return "Die Liste Ist nicht da (Du kannst Sie anlegen)", 400
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue