mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +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:
|
except BasketItem.DoesNotExist:
|
||||||
return
|
return
|
||||||
item.quantity -= q
|
item.quantity -= q
|
||||||
item.save()
|
|
||||||
if item.quantity <= 0:
|
if item.quantity <= 0:
|
||||||
item.delete()
|
item.delete()
|
||||||
|
else:
|
||||||
|
item.save()
|
||||||
|
|
||||||
def clear(self) -> None:
|
def clear(self) -> None:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user