This commit is contained in:
Lucas Verney 2021-04-13 18:58:55 +02:00
parent cbe9461809
commit e284a71a43

View File

@ -314,8 +314,9 @@ def fetch_flats(config):
backend=backend, backend=backend,
last_fetch=arrow.get(last_fetch_by_backends[backend]).date() last_fetch=arrow.get(last_fetch_by_backends[backend]).date()
) )
session.add(last_fetch_in_db) if last_fetch_in_db:
session.commit() session.add(last_fetch_in_db)
session.commit()
housing_posts = housing_posts[: config["max_entries"]] housing_posts = housing_posts[: config["max_entries"]]
LOGGER.info("Fetched %d flats.", len(housing_posts)) LOGGER.info("Fetched %d flats.", len(housing_posts))