mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 17:38:54 +00:00
Fix: visualization tab wasnt updating on add/delete.
This commit is contained in:
parent
07b6b16fda
commit
9213a18057
@ -92,7 +92,7 @@ function QuerySourceCtrl(Events, toastr, $controller, $scope, $location, $http,
|
||||
Events.record('delete', 'visualization', vis.id);
|
||||
|
||||
Visualization.delete({ id: vis.id }, () => {
|
||||
if ($scope.selectedTab === vis.id) {
|
||||
if ($scope.selectedTab === String(vis.id)) {
|
||||
$scope.selectedTab = DEFAULT_TAB;
|
||||
$location.hash($scope.selectedTab);
|
||||
}
|
||||
|
@ -19,10 +19,11 @@ class VisualizationListResource(BaseResource):
|
||||
|
||||
vis = models.Visualization(**kwargs)
|
||||
models.db.session.add(vis)
|
||||
d = vis.to_dict(with_query=False)
|
||||
models.db.session.commit()
|
||||
d = vis.to_dict(with_query=False)
|
||||
return d
|
||||
|
||||
|
||||
class VisualizationResource(BaseResource):
|
||||
@require_permission('edit_query')
|
||||
def post(self, visualization_id):
|
||||
|
Loading…
Reference in New Issue
Block a user