优化用户解绑

FFIB 1 年之前
父节点
当前提交
b550b96e0b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      api/mch_views.py

+ 2 - 1
api/mch_views.py

@@ -561,7 +561,8 @@ def consumer_shot_unbinding(request):
561 561
 
562 562
         if not unbound and user.shots_num <= 5:
563 563
             user.level -= 1
564
-        user.shots_num -= 1
564
+        if not unbound:
565
+            user.shots_num -= 1
565 566
         user.save()
566 567
 
567 568
         ConsumeShotUnbindingInfo.objects.update_or_create(user_id=user_id, submit_pk=submit_pk, defaults={