Skip to content

Commit

Permalink
fix : avoid returning blank keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoBouttes committed Jan 28, 2025
1 parent a9190dc commit 5369eee
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/fr/insee/rmes/services/datasets/DataSetsImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,16 @@ protected void testPresenceVariablePuisAjout(DataSetModelSwagger reponse, JSONOb
}
//récupération de keyword
if (catalogue_result.has("keywordLg1") ){
List<LangContent> keyword = constructLangContentList(catalogue_result.getString("keywordLg1"),Config.LG1);
reponse.setKeyword(keyword);
if (catalogue_result.getString("keywordLg1").length()>0){
List<LangContent> keyword = constructLangContentList(catalogue_result.getString("keywordLg1"),Config.LG1);
reponse.setKeyword(keyword);
}
}
if (catalogue_result.has("keywordLg2") ){
List<LangContent> keyword = constructLangContentList(catalogue_result.getString("keywordLg2"),Config.LG2);
reponse.setKeyword(keyword);
if (catalogue_result.getString("keywordLg2").length()>0){
List<LangContent> keyword = constructLangContentList(catalogue_result.getString("keywordLg2"),Config.LG2);
reponse.setKeyword(keyword);
}
}


Expand Down

0 comments on commit 5369eee

Please sign in to comment.