drakeo338 opened a new pull request, #44866: URL: https://github.com/apache/superset/pull/44866
### SUMMARY Fixes #44865. `CurrentUserRestApi.pre_update` set `changed_by_fk` to the user's own id when they edited their profile. `User.changed_by` is a self-referential relationship without `post_update`, so SQLAlchemy raised `CircularDependencyError` when deleting that user, leaving them undeletable. This drops the assignment, so `changed_by_fk` is no longer pointed at the user's own row. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A ### TESTING INSTRUCTIONS `pytest tests/unit_tests/views/test_current_user_api.py`. The new test fails without the change (`assert 1 != 1`) and passes with it (8 passed). No other checks were run, so none are claimed. ### ADDITIONAL INFORMATION - [x] Has associated issue: #44865 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
