Skip to content

Commit

Permalink
🐛 correct charts in old WDI (#3343)
Browse files Browse the repository at this point in the history
* empty

* improve err message

* 🐛 don't get slugs of unpublished charts

---------

Co-authored-by: lucasrodes <[email protected]>
Co-authored-by: Marigold <[email protected]>
  • Loading branch information
3 people authored Oct 1, 2024
1 parent c9c1238 commit ac6606d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/wizard/app_pages/chart_diff/chart_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ def slug(self) -> str:
If slug of the chart miss-matches between target and source sessions, an error is displayed.
"""
if self.target_chart:
assert self.source_chart.slug == self.target_chart.slug, "Slug mismatch!"
# Only published charts have slugs
if self.target_chart.publishedAt is not None:
assert (
self.source_chart.slug == self.target_chart.slug
), f"Slug mismatch! {self.source_chart.slug} != {self.target_chart.slug}"
return self.source_chart.slug or "no-slug"

@property
Expand Down

0 comments on commit ac6606d

Please sign in to comment.