Skip to content

Commit e0fbb6a

Browse files
committed
Allow PostCommand subclasses exclude 'apiVersion' parameter
SVN r64823 |2019-12-06 20:54:05 +0000
1 parent 9c8785c commit e0fbb6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/src/org/labkey/remoteapi/PostCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ protected HttpUriRequest createRequest(URI uri)
108108

109109
if (null != json)
110110
{
111-
if (!json.containsKey("apiVersion"))
112-
json.put("apiVersion", getRequiredVersion());
111+
if (!json.containsKey(CommonParameters.apiVersion.name()) && getRequiredVersion() > 0)
112+
json.put(CommonParameters.apiVersion.name(), getRequiredVersion());
113113

114114
request.setEntity(new StringEntity(json.toString(), ContentType.APPLICATION_JSON));
115115
}

0 commit comments

Comments
 (0)