Crop to max_entries at most

This commit is contained in:
Gautier P 2021-01-18 10:40:34 +01:00
parent fefab6ea36
commit 395a8ba72b

View File

@ -275,6 +275,7 @@ def fetch_flats(config):
webOOB_proxy.query(query, config["max_entries"], webOOB_proxy.query(query, config["max_entries"],
config["store_personal_data"]) config["store_personal_data"])
) )
housing_posts = housing_posts[:config["max_entries"]]
LOGGER.info("Fetched %d flats.", len(housing_posts)) LOGGER.info("Fetched %d flats.", len(housing_posts))
constraint_flats_list = [json.loads(flat) for flat in housing_posts] constraint_flats_list = [json.loads(flat) for flat in housing_posts]