优化用户解绑

FFIB 1 year ago
parent
commit
b550b96e0b
1 changed files with 2 additions and 1 deletions
  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={