You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/05/30 14:12:57 UTC
[GitHub] [incubator-superset] smacker opened a new pull request #7621: fix:
Better error message for dashboard import
smacker opened a new pull request #7621: fix: Better error message for dashboard import
URL: https://github.com/apache/incubator-superset/pull/7621
### CATEGORY
Choose one
- [x] Bug Fix
- [ ] Enhancement (new features, refinement)
- [ ] Refactor
- [ ] Add tests
- [ ] Build / Development Environment
- [ ] Documentation
### SUMMARY
Common mistake is trying to import dashboard without creating
datasources first. Currently it causes error 500 with a message
> sqlalchemy.orm.exc.NoResultFound: No row was found for one()
which is difficult to understand.
This commit catches NoResultFound error and returns human readable error
using flash('danger').
Ref: #2992
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<img width="1095" alt="Screenshot 2019-05-30 at 16 04 50" src="https://user-images.githubusercontent.com/406916/58638611-8fa40400-82f5-11e9-9c84-952fe3140c7d.png">
<img width="1122" alt="Screenshot 2019-05-30 at 16 03 59" src="https://user-images.githubusercontent.com/406916/58638615-929ef480-82f5-11e9-936d-6d9530474c1d.png">
### TEST PLAN
Export dashboard on one instance of Superset. Try to import it on another one without creating datasources first.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [x] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
### REVIEWERS
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org