From a75985082ac529458c38658ce14d18025d329afa Mon Sep 17 00:00:00 2001
From: zhongshangwu <zhongshangwu7@gmail.com>
Date: Sat, 31 Aug 2019 10:01:13 +0800
Subject: [PATCH] fix

---
 api/tag.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/api/tag.py b/api/tag.py
index f71338c..f25b7c4 100644
--- a/api/tag.py
+++ b/api/tag.py
@@ -282,7 +282,7 @@ class TagSetDeleteView(APIView):
 class TagSetUpdateOrCreateView(APIView):
 
     def post(self, request):
-        tag_set_id = int(request.POST.get("id", 0))
+        tag_set_id = int(request.POST.get("id", 0) or 0)
         name = request.POST.get("name", "")
         tag_ids = json.loads(request.POST.get("tag_ids", '[]'))
 
-- 
2.18.0