This commit is contained in:
Lucas Verney 2021-04-13 18:58:55 +02:00
父節點 cbe9461809
當前提交 e284a71a43
共有 1 個文件被更改,包括 3 次插入2 次删除

查看文件

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