Revert "Bugfix"

This reverts commit e284a71a43.
This commit is contained in:
Lucas Verney 2021-04-28 19:54:09 +02:00
parent 699cec5329
commit ff927cbafa
1 changed files with 2 additions and 3 deletions

View File

@ -314,9 +314,8 @@ 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()
) )
if last_fetch_in_db: session.add(last_fetch_in_db)
session.add(last_fetch_in_db) session.commit()
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))