mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-07 00:00:11 +00:00
Throw error when aspects are empty
This commit is contained in:
parent
d801c3e1c4
commit
fcd13000ef
@ -11,6 +11,8 @@ class WorkUnitMCEExtractor(Extractor):
|
||||
pass
|
||||
|
||||
def get_records(self, workunit) -> Iterable[RecordEnvelope[MetadataChangeEvent]]:
|
||||
if len(workunit.mce.proposedSnapshot.aspects) == 0:
|
||||
raise AttributeError('every mce must have at least one aspect')
|
||||
yield RecordEnvelope(workunit.mce, {})
|
||||
|
||||
def close(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user