mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-21 21:53:30 +00:00
refonte de la boutique en ligne
This commit is contained in:
parent
8b09ba2924
commit
c245ef7149
@ -93,9 +93,10 @@ class Basket(models.Model):
|
||||
except BasketItem.DoesNotExist:
|
||||
return
|
||||
item.quantity -= q
|
||||
item.save()
|
||||
if item.quantity <= 0:
|
||||
item.delete()
|
||||
else:
|
||||
item.save()
|
||||
|
||||
def clear(self) -> None:
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user