Commit d3a9208 1 parent 629b6bf commit d3a9208 Copy full SHA for d3a9208
File tree 2 files changed +5
-5
lines changed
src/datahub/ingestion/source/metadata
tests/integration/business-glossary
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -161,19 +161,21 @@ def get_owners_multiple_types(owners: OwnersMultipleTypes) -> models.OwnershipCl
161
161
if isinstance (owners , Owners ):
162
162
return models .OwnershipClass (owners = list (get_owners (owners )))
163
163
164
- owners_meta = [ ]
164
+ owners_meta : List [ models . OwnerClass ]
165
165
for owner in owners :
166
166
owners_meta .extend (get_owners (owner ))
167
167
168
168
return models .OwnershipClass (owners = owners_meta )
169
169
170
170
171
171
def get_owners (owners : Owners ) -> Iterable [models .OwnerClass ]:
172
- if owners .type .startswith ("urn:li:ownershipType:" ):
172
+ if owners .type and owners . type .startswith ("urn:li:ownershipType:" ):
173
173
ownership_type = "CUSTOM"
174
174
ownership_type_urn = owners .type
175
175
else :
176
- ownership_type , ownership_type_urn = validate_ownership_type (owners .type )
176
+ ownership_type , ownership_type_urn = validate_ownership_type (
177
+ owners .type or models .OwnershipTypeClass .DEVELOPER
178
+ )
177
179
178
180
if owners .typeUrn is not None :
179
181
ownership_type_urn = owners .typeUrn
Original file line number Diff line number Diff line change @@ -80,8 +80,6 @@ def test_single_owner_types(
80
80
mock_time ,
81
81
):
82
82
"""Test basic single owner cases with different ownership types"""
83
- output_mces_path : str = f"{ tmp_path } /single_owner_types.json"
84
- print (f"\n Output file location: { output_mces_path } " )
85
83
test_resources_dir = pytestconfig .rootpath / "tests/integration/business-glossary"
86
84
output_mces_path : str = f"{ tmp_path } /single_owner_types.json"
87
85
golden_mces_path : str = f"{ test_resources_dir } /single_owner_types_golden.json"
You can’t perform that action at this time.
0 commit comments