From 2d8dfcb7c746c1be9a6507f77e66bb2e4010c0d9 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Fri, 3 Nov 2017 17:41:16 +0100 Subject: [PATCH] Fix a bug with minimum number of photos constraint --- flatisfy/filters/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatisfy/filters/__init__.py b/flatisfy/filters/__init__.py index 5cf9104..01d286b 100644 --- a/flatisfy/filters/__init__.py +++ b/flatisfy/filters/__init__.py @@ -101,7 +101,7 @@ def refine_with_details_criteria(flats_list, constraint): for i, flat in enumerate(flats_list): # Check number of pictures has_enough_photos = tools.is_within_interval( - flat.get('photos', []), + len(flat.get('photos', [])), constraint['minimum_nb_photos'], None )