mirror of
https://github.com/ae-utbm/sith.git
synced 2025-11-10 14:03:12 +00:00
apply new ruff rules
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user