NR: fix regression introduced by HTTP util changes

This commit is contained in:
Evelyn 2018-12-17 09:24:18 +00:00
parent 28900c2ff9
commit 45fe512457

View file

@ -238,7 +238,8 @@ class Module(ModuleManager.BaseModule):
summary_query = utils.http.request("%s/json/summaries/%s?uids=%s" % (eagle_url, now.date().isoformat(), "%20".join([a["uid"] for a in trains])), json=True, headers={"x-eagle-key": self.bot.config["eagle-api-key"]}) summary_query = utils.http.request("%s/json/summaries/%s?uids=%s" % (eagle_url, now.date().isoformat(), "%20".join([a["uid"] for a in trains])), json=True, headers={"x-eagle-key": self.bot.config["eagle-api-key"]})
if summary_query: if summary_query:
for t in trains: for t in trains:
summary = summary_query.data[t["uid"]] summary = summary_query.data.get(t["uid"])
if summary:
t.update(summary) t.update(summary)
summary_plat = summary.get("platforms", {}).get(query["crs"]) summary_plat = summary.get("platforms", {}).get(query["crs"])
if summary_plat and t["platform"]=="?": if summary_plat and t["platform"]=="?":