fix: Fix parsing onSaving reports toast when user hasn't saved chart#16330
Conversation
| self._properties["dashboard"] = dashboard | ||
| elif not update: | ||
| exceptions.append(ReportScheduleChartOrDashboardValidationError()) | ||
| exceptions.append(ChartNotSavedValidationError()) |
There was a problem hiding this comment.
is it possible that this could be a dashboard?
There was a problem hiding this comment.
From my understanding dashboards would always be saved and have a record in the metastore, but for a more defensive approach i'll make a specific condition for both dashboards and charts just in case.
Codecov Report
@@ Coverage Diff @@
## master #16330 +/- ##
==========================================
- Coverage 76.63% 76.58% -0.06%
==========================================
Files 1000 1000
Lines 53424 53465 +41
Branches 6818 6816 -2
==========================================
+ Hits 40943 40944 +1
- Misses 12245 12285 +40
Partials 236 236
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
betodealmeida
left a comment
There was a problem hiding this comment.
Looks great! We should also disable the report button if the user hasn't saved the chart, and have a tooltip that tells them to save it.
cc: @yousoph
* master: (582 commits) feat: config to customize bootstrap data overrides (apache#16386) fix: regex for multi-region IPs (apache#16410) chore: Changes the DatabaseSelector to use the new Select component (apache#16334) chore: Displays the dataset description in a tooltip in the datasets list (apache#16392) fix(pylint): Fix master (apache#16405) chore(pylint): Enable useless-suppression check (apache#16388) feat: Add extraVolumes and extraVolumeMounts to all main containers (apache#16361) initial commit (apache#16366) fix: big number default date format (apache#16383) initial commit (apache#16380) fix: import dashboard w/o metadata (apache#16360) test: Functional RTL for email report modal II (apache#16148) fix: update table ID in query context on chart import (apache#16374) docs: document FLASK_APP_MUTATOR (apache#16286) feat: Add new dev commands to Makefile (apache#16327) fix: call external metadata endpoint with correct rison object (apache#16369) fix: Fix parsing onSaving reports toast when user hasn't saved chart (apache#16330) fix: columns/index rebuild (apache#16355) chore(viz): bump deckgl plugin to 0.4.11 (apache#16353) fix: Blank space in Change dataset modal without warning message (apache#16324) ... # Conflicts: # superset/app.py # superset/models/dashboard.py # tests/integration_tests/charts/filter_sets/__init__.py # tests/integration_tests/charts/filter_sets/conftest.py # tests/integration_tests/charts/filter_sets/consts.py # tests/integration_tests/charts/filter_sets/create_api_tests.py # tests/integration_tests/charts/filter_sets/delete_api_tests.py # tests/integration_tests/charts/filter_sets/get_api_tests.py # tests/integration_tests/charts/filter_sets/update_api_tests.py # tests/integration_tests/charts/filter_sets/utils.py # tests/integration_tests/superset_test_config.py
…pache#16330) * don't maniuplate error message * remove extra idx reference * u * change print * update with test * add case for dashboards * fix test
…pache#16330) * don't maniuplate error message * remove extra idx reference * u * change print * update with test * add case for dashboards * fix test
…pache#16330) * don't maniuplate error message * remove extra idx reference * u * change print * update with test * add case for dashboards * fix test
SUMMARY
Remove extra index when parsing errors to render to user. This was specfically happening when users would try to create a report without saving the chart
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION