Skip to content

Commit

Permalink
Update models.py
Browse files Browse the repository at this point in the history
Availability to is_available() added as a return
  • Loading branch information
michalkrzem authored Nov 25, 2023
1 parent 2cac17c commit bd129d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Dshop/apps/products_catalogue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit bd129d3

Please sign in to comment.