Skip to content

Commit

Permalink
Prevent the cannot-overwrite error message from being removed before …
Browse files Browse the repository at this point in the history
…it can be seen (#626)
  • Loading branch information
x4base authored and mistercrunch committed Jun 15, 2016
1 parent aa2b8b4 commit ee2d333
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion caravel/assets/javascripts/explore.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ function query(force, pushState) {
}
$('.query-and-save button').attr('disabled', 'disabled');
$('.btn-group.results span,a').attr('disabled', 'disabled');
$('div.alert').remove();
if (force) { // Don't hide the alert message when the page is just loaded
$('div.alert').remove();
}
$('#is_cached').hide();
prepForm();
slice.render(force);
Expand Down
2 changes: 1 addition & 1 deletion caravel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ def save_slice(self, slc):
def overwrite_slice(self, slc):
can_update = check_ownership(slc, raise_if_false=False)
if not can_update:
flash("You cannot overwrite [{}]".format(slc))
flash("You cannot overwrite [{}]".format(slc), "danger")
else:
session = db.session()
session.merge(slc)
Expand Down

0 comments on commit ee2d333

Please sign in to comment.