Skip to content

Commit

Permalink
new import validation
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Sep 15, 2018
1 parent ed1ad4c commit 383650b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/budy/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,9 @@ def get_currency_ripe(self, currency = None):

def get_image(self, size = None, order = None):
for image in self.images:
if not image: continue
if not hasattr(image, "size"): continue
if not hasattr(image, "order"): continue
is_size = size == None or image.size == size
if not is_size: continue
is_order = order == None or image.order == order
Expand Down

0 comments on commit 383650b

Please sign in to comment.