From 8a50dd3302d43e3a6d3762b1dfd6558ad1e84bff Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Wed, 3 May 2017 08:54:03 +0200 Subject: [PATCH] Do not refetch details on filtering. To fetch details, one should do import. Closes issue #38. --- flatisfy/cmds.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flatisfy/cmds.py b/flatisfy/cmds.py index 69a51cd..c680692 100644 --- a/flatisfy/cmds.py +++ b/flatisfy/cmds.py @@ -85,8 +85,9 @@ def import_and_filter(config, load_from_db=False): flats_list = fetch.load_flats_list_from_db(config) else: flats_list = fetch.fetch_flats_list(config) + # Do not fetch additional details if we loaded data from the db. flats_list_by_status = filter_flats(config, flats_list=flats_list, - fetch_details=True) + fetch_details=(not load_from_db)) # Create database connection get_session = database.init_db(config["database"], config["search_index"])