fix KeyError when creating new ads

This commit is contained in:
sebthom
2022-02-16 22:51:50 +01:00
parent 56646db5b5
commit 51fbc79ff7

View File

@@ -443,7 +443,7 @@ class KleinanzeigenBot(SeleniumMixin):
self.web_await(EC.url_contains("p-anzeige-aufgeben-bestaetigung.html?adId="), 20)
ad_cfg_orig["updated_on"] = datetime.utcnow().isoformat()
if not ad_cfg_orig["created_on"] and not ad_cfg_orig["id"]:
if not ad_cfg["created_on"] and not ad_cfg["id"]:
ad_cfg_orig["created_on"] = ad_cfg_orig["updated_on"]
# extract the ad id from the URL's query parameter