FrancescoCastaldi commented on PR #45036: URL: https://github.com/apache/superset/pull/45036#issuecomment-6055755016
Thanks @gabotorresruiz for the thorough review and spot-on analysis. Pushed commit 1c9308e27b addressing the feedback: 1. Removed the `sqla.inspect` mock inspection branch in `copy_dashboard`. 2. Implemented `_rebind` inside `_copy_dashboard_for_user` to re-fetch `Subject` instances within the isolated session (`session.query(Subject).filter(Subject.id.in_(ids)).all()`) and read groups directly from in-memory `target.groups`. 3. Updated `test_copy_dashboard_attaches_viewers_from_the_users_in_memory_groups` to mock `Session` directly rather than `sqla.inspect`, and added a test covering subject re-binding in the isolated session. 4. Dropped `_is_mock` and `_get_username_column` from `manager.py`, leaving `ExcludeUsersFilter` untouched. All 46 unit tests in `models/dashboard_test.py`, `subjects/test_creator_group_call_sites.py` and `security/exclude_users_filter_test.py` pass cleanly. -- 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]
