apply new ruff rules

This commit is contained in:
imperosol
2025-11-07 16:24:28 +01:00
parent d940e32dac
commit f027464d0e
7 changed files with 19 additions and 21 deletions

View File

@@ -242,7 +242,7 @@ class Invoice(models.Model):
def validate(self):
if self.validated:
raise DataError(_("Invoice already validated"))
customer, created = Customer.get_or_create(user=self.user)
customer, _created = Customer.get_or_create(user=self.user)
eboutic = Counter.objects.filter(type="EBOUTIC").first()
for i in self.items.all():
if i.type_id == settings.SITH_COUNTER_PRODUCTTYPE_REFILLING:

View File

@@ -108,7 +108,7 @@ class TestPaymentSith(TestPaymentBase):
)
assert Basket.objects.filter(id=self.basket.id).first() is None
self.customer.customer.refresh_from_db()
assert self.customer.customer.amount == Decimal("1")
assert self.customer.customer.amount == Decimal(1)
sellings = Selling.objects.filter(customer=self.customer.customer).order_by(
"quantity"