Skip to content

Commit

Permalink
code refactor not to occur nullpointer exception (#2816)
Browse files Browse the repository at this point in the history
Signed-off-by: Dhrubo Saha <[email protected]>
(cherry picked from commit a4dff63)
  • Loading branch information
dhrubo-os authored and github-actions[bot] committed Aug 9, 2024
1 parent 04918e5 commit 2cf0fc0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,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 2cf0fc0

Please sign in to comment.