Skip to content

Commit

Permalink
fix: only inject node description if its empty in the yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
z3z1ma committed Jan 17, 2025
1 parent 21f5264 commit 2c77360
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Fixed-20250117-001238.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Fixed
body: Only inject node description if yaml description is empty
time: 2025-01-17T00:12:38.400622872-07:00
4 changes: 1 addition & 3 deletions src/dbt_osmosis/core/osmosis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,10 +1387,8 @@ def _sync_doc_section(
We assume node is the single source of truth, so doc_section is replaced.
"""
logger.debug(":arrows_counterclockwise: Syncing doc_section with node => %s", node.unique_id)
if node.description:
if node.description and not doc_section.get("description"):
doc_section["description"] = node.description
else:
doc_section.pop("description", None)

current_columns: list[dict[str, t.Any]] = doc_section.setdefault("columns", [])
incoming_columns: list[dict[str, t.Any]] = []
Expand Down
10 changes: 5 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2c77360

Please sign in to comment.