优化用户解绑

FFIB hace 1 año
padre
commit
b550b96e0b
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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={