Skip to content

Commit

Permalink
Merge pull request #1634 from AtlasOfLivingAustralia/feature/scistart…
Browse files Browse the repository at this point in the history
…er-updates

Feature/scistarter updates
  • Loading branch information
temi authored Sep 24, 2024
2 parents 3b840a4 + 5edf104 commit ec01f60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ class ProjectService {
Map importSciStarterProjects() throws SocketTimeoutException, Exception{
String url = "${grailsApplication.config.ecodata.service.url}/project/importProjectsFromSciStarter";
Map response = webService.doPostWithParams(url, [:]);
if(response.resp && response.resp.count != null){
if(response.resp && response.resp.created != null){
return response.resp
} else {
if(response.error.contains('Timed out')){
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/admin/tools.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
method:"POST"
}
).done(function(result) {
alert("Successfully imported " + result.count + " SciStarter projects!");
alert("SciStarter import complete: " + result.created + " created, " + result.updated + " updated, " + result.ignored + " ignored");
document.location.reload();
}).fail(function (result) {
alert(result.statusText);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ class SciStarter {
ecoScienceType : doc.ecoScienceType,
isDIY : doc.isDIY?.toBoolean(),
isSciStarter : doc.isSciStarter?.toBoolean(),
isSuitableForChildren : doc.isSuitableForChildren?.toBoolean(),
hasParticipantCost : doc.hasParticipantCost?.toBoolean(),
origin : doc.origin,
equipment : doc.gear,
plannedStartDate : doc.plannedStartDate,
plannedEndDate : doc.plannedEndDate,
Expand Down

0 comments on commit ec01f60

Please sign in to comment.