Skip to content

Commit

Permalink
fix: add failsaves for domains missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanguy-Boisset committed Oct 10, 2023
1 parent 3dba490 commit b356841
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ad_miner/sources/modules/domains.py
Expand Up @@ -1579,7 +1579,10 @@ def generatePathToOUHandlers(self):
ous_with_da_by_admin[domain[0]] = []

for path in self.objects_to_ou_handlers:
self.paths_to_ou_handlers[path.nodes[-1].domain].append(path)
try:
self.paths_to_ou_handlers[path.nodes[-1].domain].append(path)
except KeyError:
self.paths_to_ou_handlers[path.nodes[-1].domain] = [path]
if (
path.nodes[0].labels != "OU"
and path.nodes[0].name
Expand Down
2 changes: 1 addition & 1 deletion ad_miner/sources/modules/neo4j_class.py
Expand Up @@ -527,7 +527,7 @@ def __init__(self, arguments, extract_date_int):
"nb_domain_collected": {
"name": "Count number of domains collected",
"request": "MATCH (m:Domain)-[r]->() "
"RETURN distinct(m.domain)",
"RETURN distinct(COALESCE(m.domain, m.name))",
"filename": "nb_domain_collected",
"method": self.requestList,
},
Expand Down

0 comments on commit b356841

Please sign in to comment.