mikebridge commented on code in PR #45482:
URL: https://github.com/apache/superset/pull/45482#discussion_r4330826663
##########
superset/versioning/restore.py:
##########
@@ -742,11 +748,35 @@ def _restore_dashboard_membership(dashboard: Any,
transaction_id: int) -> list[i
if window.contains(transaction_id)
}
)
- if not member_ids:
- dashboard.slices = []
- return []
-
- live_slices =
db.session.query(Slice).filter(Slice.id.in_(member_ids)).all()
+ # Archived charts must be visible both to the lookup and to the
+ # assignment, which diffs against the current membership. A membership
+ # loaded through ``dashboard.slices`` misses archived members, even inside
+ # the bypass, because the dashboard's own load carried the filter, so the
+ # flush would keep or re-insert their rows. Read it from the association
+ # table instead and diff against that.
Review Comment:
PR is up: #45543. I credited your diagnosis there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]