File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
algoliasearch/src/main/java/com/algolia/api Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -7022,7 +7022,10 @@ public <T> ReplaceAllObjectsResponse replaceAllObjects(
7022
7022
public String generateSecuredApiKey (@ Nonnull String parentApiKey , @ Nonnull SecuredApiKeyRestrictions restrictions ) throws Exception {
7023
7023
Map <String , String > restrictionsMap = new HashMap <>();
7024
7024
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
+ );
7026
7029
if (restrictions .getRestrictIndices () != null ) restrictionsMap .put (
7027
7030
"restrictIndices" ,
7028
7031
StringUtils .paramToString (restrictions .getRestrictIndices ())
You can’t perform that action at this time.
0 commit comments