ruff rule FBT

This commit is contained in:
thomas girod
2024-06-27 14:57:40 +02:00
parent cfc19434d0
commit 171a1cb876
11 changed files with 26 additions and 26 deletions

View File

@ -128,7 +128,7 @@ class Customer(models.Model):
account = cls.objects.create(user=user, account_id=account_id)
return account, True
def save(self, allow_negative=False, is_selling=False, *args, **kwargs):
def save(self, *args, allow_negative=False, is_selling=False, **kwargs):
"""
is_selling : tell if the current action is a selling
allow_negative : ignored if not a selling. Allow a selling to put the account in negative
@ -776,7 +776,7 @@ class Selling(models.Model):
}
self.customer.user.email_user(subject, message_txt, html_message=message_html)
def save(self, allow_negative=False, *args, **kwargs):
def save(self, *args, allow_negative=False, **kwargs):
"""
allow_negative : Allow this selling to use more money than available for this user
"""

View File

@ -1695,7 +1695,7 @@ class StudentCardFormView(FormView):
)
def __manage_billing_info_req(request, user_id, delete_if_fail=False):
def __manage_billing_info_req(request, user_id, *, delete_if_fail=False):
data = json.loads(request.body)
form = BillingInfoForm(data)
if not form.is_valid():
@ -1725,7 +1725,7 @@ def create_billing_info(request, user_id):
user = get_object_or_404(User, pk=user_id)
customer, _ = Customer.get_or_create(user)
BillingInfo.objects.create(customer=customer)
return __manage_billing_info_req(request, user_id, True)
return __manage_billing_info_req(request, user_id, delete_if_fail=True)
@login_required