Skip to content

Commit

Permalink
fix(ingest/ldap): Handle case when 'objectClass' not in attrs (#8658)
Browse files Browse the repository at this point in the history
  • Loading branch information
asikowitz authored Aug 23, 2023
1 parent 8141e2d commit 01ae5d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions metadata-ingestion/src/datahub/ingestion/source/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,11 @@ def get_workunits_internal(self) -> Iterable[MetadataWorkUnit]:
if dn is None:
continue

if not attrs:
if not attrs or "objectClass" not in attrs:
self.report.report_warning(
"<general>",
f"skipping {dn} because attrs is empty; check your permissions if this is unexpected",
f"skipping {dn} because attrs ({attrs}) does not contain expected data; "
f"check your permissions if this is unexpected",
)
continue

Expand Down

0 comments on commit 01ae5d9

Please sign in to comment.