Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Aug 27, 2018
1 parent 66a8194 commit fdc0e4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/budy/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ def related(self, limit = 6, available = True, enabled = True):
if self.collections: kwargs["collections"] = {"$in" : [self.collections[0].id]}
elif self.categories: kwargs["categories"] = {"$in" : [self.categories[0].id]}
elif self.colors: kwargs["colors"] = {"$in" : [self.colors[0].id]}
elif self.brands: kwargs["brands"] = {"$in" : [self.brands[0].id]}
elif self.seasons: kwargs["seasons"] = {"$in" : [self.seasons[0].id]}
elif self.brands: kwargs["brands"] = {"$in" : [self.brand.id]}
elif self.seasons: kwargs["seasons"] = {"$in" : [self.season.id]}
kwargs["id"] = {"$nin" : [self.id]}
kwargs["sort"] = [("id", 1)]
count = cls.count(**kwargs)
Expand Down

0 comments on commit fdc0e4d

Please sign in to comment.