From c5f85d0d871f3629a28f9957f4509f5f6e0bd615 Mon Sep 17 00:00:00 2001 From: Bui Date: Sun, 15 Mar 2020 16:25:38 +0000 Subject: [PATCH] allow null category id --- app.py | 2 +- templates/admin_song_detail.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index ee64489..76a0dcc 100644 --- a/app.py +++ b/app.py @@ -169,7 +169,7 @@ def route_admin_songs_id_post(id): else: output['courses'][course] = None - output['category_id'] = int(request.form.get('category_id')) + output['category_id'] = int(request.form.get('category_id')) or None output['type'] = request.form.get('type') output['offset'] = float(request.form.get('offset')) or None output['skin_id'] = int(request.form.get('skin_id')) or None diff --git a/templates/admin_song_detail.html b/templates/admin_song_detail.html index a8e2d54..9389f2d 100644 --- a/templates/admin_song_detail.html +++ b/templates/admin_song_detail.html @@ -65,6 +65,7 @@