Reject update request that has both script and doc
This commit is contained in:
parent
9ddd675a02
commit
47971ac808
|
@ -94,6 +94,9 @@ public class UpdateRequest extends InstanceShardOperationRequest<UpdateRequest>
|
|||
if (script == null && doc == null) {
|
||||
validationException = addValidationError("script or doc is missing", validationException);
|
||||
}
|
||||
if (script != null && doc != null) {
|
||||
validationException = addValidationError("can't provide both script and doc", validationException);
|
||||
}
|
||||
return validationException;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue