Skip to content

Commit

Permalink
Fix value of use_shakemap in case the corresponding selector does not…
Browse files Browse the repository at this point in the history
… exist (e.g. level 1)
  • Loading branch information
ptormene committed Jan 8, 2025
1 parent e18e194 commit 8942feb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openquake/server/static/js/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ function capitalizeFirstLetter(val) {
var formData = new FormData();
formData.append('rupture_file', $('#rupture_file_input')[0].files[0]);
formData.append('usgs_id', $("#usgs_id").val());
formData.append('use_shakemap', $("#use_shakemap").is(':checked'));
formData.append('use_shakemap', $("#use_shakemap").length === 0 || $("#use_shakemap").is(':checked'));
$.ajax({
type: "POST",
url: gem_oq_server_url + "/v1/calc/aristotle_get_rupture_data",
Expand Down Expand Up @@ -720,7 +720,7 @@ function capitalizeFirstLetter(val) {
formData.append('rupture_from_usgs', $('#rupture_from_usgs').val());
formData.append('rupture_file', $('#rupture_file_input')[0].files[0]);
formData.append('usgs_id', $("#usgs_id").val());
formData.append('use_shakemap', $("#use_shakemap").is(':checked'));
formData.append('use_shakemap', $("#use_shakemap").length === 0 || $("#use_shakemap").is(':checked'));
formData.append('lon', $("#lon").val());
formData.append('lat', $("#lat").val());
formData.append('dep', $("#dep").val());
Expand Down

0 comments on commit 8942feb

Please sign in to comment.