Skip to content

Commit 664fecc

Browse files
algolia-botshortcutsmorganleroimillotpFluf22
committed
docs: lot of guides (generated)
algolia/api-clients-automation#4355 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]> Co-authored-by: Morgan Leroi <[email protected]> Co-authored-by: Pierre Millot <[email protected]> Co-authored-by: Thomas Raffray <[email protected]>
1 parent a850bab commit 664fecc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

algoliasearch/src/main/java/com/algolia/api/SearchClient.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7022,7 +7022,10 @@ public <T> ReplaceAllObjectsResponse replaceAllObjects(
70227022
public String generateSecuredApiKey(@Nonnull String parentApiKey, @Nonnull SecuredApiKeyRestrictions restrictions) throws Exception {
70237023
Map<String, String> restrictionsMap = new HashMap<>();
70247024
if (restrictions.getFilters() != null) restrictionsMap.put("filters", StringUtils.paramToString(restrictions.getFilters()));
7025-
if (restrictions.getValidUntil() != 0) restrictionsMap.put("validUntil", StringUtils.paramToString(restrictions.getValidUntil()));
7025+
if (restrictions.getValidUntil() != null && restrictions.getValidUntil() != 0) restrictionsMap.put(
7026+
"validUntil",
7027+
StringUtils.paramToString(restrictions.getValidUntil())
7028+
);
70267029
if (restrictions.getRestrictIndices() != null) restrictionsMap.put(
70277030
"restrictIndices",
70287031
StringUtils.paramToString(restrictions.getRestrictIndices())

0 commit comments

Comments
 (0)