-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Table Columns & Metrics Bulk-actionable #3929
Make Table Columns & Metrics Bulk-actionable #3929
Conversation
@alanmcruickshank @mistercrunch I'm not certain (because I am not a JavaScript developer), but I think I have a problem caused by this on my instance where attempting to delete Metrics gives an error like:
If I look at the network requests issued by the browser, I can see:
I.e. the browser is posting to I can see that selecting the Delete option from the Actions drop down is running:
But I can't see how it work's out which model it is using. It should be easy to test on your instance(s) just by looking at the network requests the browser is issuing and working out if they apply to the correct model in all cases. |
Note that if there are actually Columns for the same Table that have the same pk as the Metrics you are deleting, then I think it will delete those instead and return successfully. |
@rhunwicks Looking at the request it sends, it's not currently dangerous - i.e. it won't delete Tables with the same pk (it's passing through a variable with the wrong name to do that - hence the error). You are however completely right that this isn't working as intended. Thanks for reporting! I'll take a look at it this week. |
@alanmcruickshank on my setup I think it is deleting Columns that have the same pk as the Metric you are trying to delete, rather than the Table. It's not very likely, but I think it is dangerous - because I noticed it when I tried to delete all the Metrics and found that I had deleted all the columns for the Table instead. |
@rhunwicks Right you are - I've just been digging into why this happens. The issue we've got is tied in with FAB. On clicking the apply actions button it submits a hidden form called I've added a pull request to roll this back for now. I'll also raise an issue with FAB to see if we can get this fixed. |
Adds the DeleteMixin to both the sqlalchemy table column view and the SQL metric view to allow mass column management. Very useful for removing large numbers of auto-generated fields.