Skip to content

Commit

Permalink
Changed: Decode human readable only if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
djuarezgf committed Nov 4, 2024
1 parent 5cb43c4 commit 141355b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/samply/query/QueryService.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public String createQuery(
tempQuery.setDescription(description);
tempQuery.setOutputFormat(outputFormat);
tempQuery.setTemplateId(templateId);
tempQuery.setHumanReadable(Base64Utils.decode(humanReadable));
tempQuery.setHumanReadable(Base64Utils.decodeIfNecessary(humanReadable));
tempQuery.setExplorerUrl(decodeUrlIfNecessary(explorerUrl));
tempQuery.setContext(queryContext);
tempQuery = this.queryRepository.save(tempQuery);
Expand Down Expand Up @@ -115,7 +115,7 @@ public void editQuery(@NotNull String projectCode,
changedKeyValueMap.put("template id", templateId);
}
if (humanReadable != null) {
projectQuery.setHumanReadable(Base64Utils.decode(humanReadable));
projectQuery.setHumanReadable(Base64Utils.decodeIfNecessary(humanReadable));
changedKeyValueMap.put("human readable", humanReadable);
}
if (explorerUrl != null) {
Expand Down

0 comments on commit 141355b

Please sign in to comment.