From bd129d3cb775de697ddc9f84d4661bf30638a558 Mon Sep 17 00:00:00 2001 From: kvothe Date: Sat, 25 Nov 2023 21:06:37 +0100 Subject: [PATCH] Update models.py Availability to is_available() added as a return --- Dshop/apps/products_catalogue/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dshop/apps/products_catalogue/models.py b/Dshop/apps/products_catalogue/models.py index 0a2bdd9..588eaeb 100644 --- a/Dshop/apps/products_catalogue/models.py +++ b/Dshop/apps/products_catalogue/models.py @@ -122,8 +122,7 @@ def get_price(self, item: CartItem) -> DecimalField: @staticmethod def is_available(self): - # How check this? - return True + return self.availability class ProductImage(models.Model):