Compare commits

..

No commits in common. "6a03ac0e774c65f526c25341ebacbbf35474e638" and "876b3901a55e78ca4916a4385f0ce3f43a958287" have entirely different histories.

1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ def get_active_problems() -> dict:
event_ids.append(problem["eventid"])
events = api.event.get(
selectHosts=["name"],
selectHosts=["host"],
eventids=event_ids,
output=[
"eventid",
@ -38,7 +38,7 @@ def get_active_problems() -> dict:
)
events_dict = {"event_ids": []}
for event in events:
event["host"] = event.pop("hosts", None)[0]["name"]
event["host"] = event.pop("hosts", None)[0]["host"]
events_dict[event["eventid"]] = event
events_dict["event_ids"].append(event["eventid"])
return events_dict