Skip to content

Commit

Permalink
remove post_serialize and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
aranke committed Dec 3, 2024
1 parent 878d5da commit f6c8715
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 0 additions & 12 deletions core/dbt/contracts/graph/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1441,12 +1441,6 @@ def same_contents(self, old: Optional["Exposure"]) -> bool:
def group(self):
return None

def __post_serialize__(self, dct: Dict, context: Optional[Dict] = None):
dct = super().__post_serialize__(dct, context)
if "_event_status" in dct:
del dct["_event_status"]
return dct


# ====================================
# Metric node
Expand Down Expand Up @@ -1665,12 +1659,6 @@ def same_contents(self, old: Optional["SavedQuery"]) -> bool:
and True
)

def __post_serialize__(self, dct: Dict, context: Optional[Dict] = None):
dct = super().__post_serialize__(dct, context)
if "_event_status" in dct:
del dct["_event_status"]
return dct


# ====================================
# Patches
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/contracts/graph/test_nodes_parsed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,7 @@ def basic_parsed_exposure_dict():
"enabled": True,
},
"unrendered_config": {},
"_event_status": {},
}


Expand All @@ -2104,6 +2105,7 @@ def basic_parsed_exposure_object():
tags=[],
config=ExposureConfig(),
unrendered_config={},
_event_status={},
)


Expand Down Expand Up @@ -2139,6 +2141,7 @@ def complex_parsed_exposure_dict():
"enabled": True,
},
"unrendered_config": {},
"_event_status": {},
}


Expand All @@ -2162,6 +2165,7 @@ def complex_parsed_exposure_object():
original_file_path="models/something.yml",
config=ExposureConfig(),
unrendered_config={},
_event_status={},
)


Expand Down

0 comments on commit f6c8715

Please sign in to comment.