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
Activating new user results with InvalidRequestError: SQL expression, column, or mapped entity expected - got 'None' #392
Comments
It seems I could solve this... First, create security module 'mysec.py' to store custom MyUser model, MyUserDBModelView and MySecurityManager. For experimenting purpose I've add a column field named 'app_access' Second, update view.caravel.checkbox method:
See here: https://gist.github.com/mnrozhkov/781b7d78972e37f9b53d71747805d836 Third, update config.py Last, migrate DB using Alembic and that's it! |
Notice: this issue has been closed because it has been inactive for 727 days. Feel free to comment and request for this issue to be reopened. |
* fix(legacy-table): avoid React DOM `jquery.datatables` will manipulate DOMs, sometimes remove them. In case of component being reloaded with updated props, React will not be able to find those removed nodes, causing a `cannot removeChild` error. Because of the the way to assign row keys, if table shape changes (add or remove columns), React may also have difficulty match the cached nodes via keys. In general it's a bad idea to directly manipulate React rendered DOM nodes, so we better just let `jquery.datatables` handle everything. In the future, once we removed `jquery.datatables`, a pure React component will not have such issues. * fix(legacy-table): handle the case when percentMetrics is null * fix(legacy-table): linting errors * refactor: use nimbus build * test(legacy-table): add React component tests * test(legacy-table): more sophisticated cases * fix: address PR apache#392 comments * chore(legacy-table): clean up tests case setups Not seeing the console.warn errors anymore. So cleaning it up. Previously it was from `<SuperChart />` component, but since we have updated the test case to not use <SuperChart>, we are good now. * fix(legacy-table): misleading comment
Bumps [d3-color](https://github.com/d3/d3-color) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/d3/d3-color/releases) - [Commits](d3/d3-color@v1.4.0...v1.4.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* fix(legacy-table): avoid React DOM `jquery.datatables` will manipulate DOMs, sometimes remove them. In case of component being reloaded with updated props, React will not be able to find those removed nodes, causing a `cannot removeChild` error. Because of the the way to assign row keys, if table shape changes (add or remove columns), React may also have difficulty match the cached nodes via keys. In general it's a bad idea to directly manipulate React rendered DOM nodes, so we better just let `jquery.datatables` handle everything. In the future, once we removed `jquery.datatables`, a pure React component will not have such issues. * fix(legacy-table): handle the case when percentMetrics is null * fix(legacy-table): linting errors * refactor: use nimbus build * test(legacy-table): add React component tests * test(legacy-table): more sophisticated cases * fix: address PR apache#392 comments * chore(legacy-table): clean up tests case setups Not seeing the console.warn errors anymore. So cleaning it up. Previously it was from `<SuperChart />` component, but since we have updated the test case to not use <SuperChart>, we are good now. * fix(legacy-table): misleading comment
Bumps [d3-color](https://github.com/d3/d3-color) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/d3/d3-color/releases) - [Commits](d3/d3-color@v1.4.0...v1.4.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* fix(legacy-table): avoid React DOM `jquery.datatables` will manipulate DOMs, sometimes remove them. In case of component being reloaded with updated props, React will not be able to find those removed nodes, causing a `cannot removeChild` error. Because of the the way to assign row keys, if table shape changes (add or remove columns), React may also have difficulty match the cached nodes via keys. In general it's a bad idea to directly manipulate React rendered DOM nodes, so we better just let `jquery.datatables` handle everything. In the future, once we removed `jquery.datatables`, a pure React component will not have such issues. * fix(legacy-table): handle the case when percentMetrics is null * fix(legacy-table): linting errors * refactor: use nimbus build * test(legacy-table): add React component tests * test(legacy-table): more sophisticated cases * fix: address PR apache#392 comments * chore(legacy-table): clean up tests case setups Not seeing the console.warn errors anymore. So cleaning it up. Previously it was from `<SuperChart />` component, but since we have updated the test case to not use <SuperChart>, we are good now. * fix(legacy-table): misleading comment
Bumps [d3-color](https://github.com/d3/d3-color) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/d3/d3-color/releases) - [Commits](d3/d3-color@v1.4.0...v1.4.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* fix(legacy-table): avoid React DOM `jquery.datatables` will manipulate DOMs, sometimes remove them. In case of component being reloaded with updated props, React will not be able to find those removed nodes, causing a `cannot removeChild` error. Because of the the way to assign row keys, if table shape changes (add or remove columns), React may also have difficulty match the cached nodes via keys. In general it's a bad idea to directly manipulate React rendered DOM nodes, so we better just let `jquery.datatables` handle everything. In the future, once we removed `jquery.datatables`, a pure React component will not have such issues. * fix(legacy-table): handle the case when percentMetrics is null * fix(legacy-table): linting errors * refactor: use nimbus build * test(legacy-table): add React component tests * test(legacy-table): more sophisticated cases * fix: address PR apache#392 comments * chore(legacy-table): clean up tests case setups Not seeing the console.warn errors anymore. So cleaning it up. Previously it was from `<SuperChart />` component, but since we have updated the test case to not use <SuperChart>, we are good now. * fix(legacy-table): misleading comment
Bumps [d3-color](https://github.com/d3/d3-color) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/d3/d3-color/releases) - [Commits](d3/d3-color@v1.4.0...v1.4.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
System details: MacOSX/10.11.4, SQLite, run under development mode
Go to Security/List users menu.
Create user and try to activate him:
Selecting checkbox "Is Active?" for new user results with _InvalidRequestError: SQL expression, column, or mapped entity expected - got 'None' _
The request "GET /caravel/checkbox/UserDBModelView/2/active/false HTTP/1.1" results with status 500 (Full traceback is here: https://gist.github.com/mnrozhkov/35c702c892fcbeb9b2683d042dc6c48f )
This url is exposed in view.caravel.checkbox method
(code sample is here: https://gist.github.com/mnrozhkov/d2a597eed823b6e2df810b505206ebcf)
The UserDBModelView is note recognized by view.caravel.checkbox method. This leads to model = 'None' . So, have you encountered this issue? Any suggestions to solve this?
The text was updated successfully, but these errors were encountered: