Skip to content

Commit

Permalink
code refactor not to occur nullpointer exception (opensearch-project#…
Browse files Browse the repository at this point in the history
…2816)

Signed-off-by: Dhrubo Saha <[email protected]>
  • Loading branch information
dhrubo-os authored Aug 9, 2024
1 parent 684627a commit a4dff63
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ private void deleteOrUpdateModelGroup(String modelGroupID, Boolean doesVersionCr
// This checks if model group is created when registering the version. If yes,
// model group is deleted since the version registration
// had failed. Else model group latest version is decremented by 1
if (doesVersionCreateModelGroup) {
if (Boolean.TRUE.equals(doesVersionCreateModelGroup)) {
DeleteRequest deleteModelGroupRequest = new DeleteRequest();
deleteModelGroupRequest.index(ML_MODEL_GROUP_INDEX).id(modelGroupID).setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
client.delete(deleteModelGroupRequest);
Expand Down

0 comments on commit a4dff63

Please sign in to comment.