From 0de73034c0eac29e831f4c9744d164e728aa5ccf Mon Sep 17 00:00:00 2001 From: Yash S <119652212+yashmsonkusare@users.noreply.github.com> Date: Thu, 4 Apr 2024 17:21:30 +0530 Subject: [PATCH] MOSIP-30099:Added the code to create the id as provided in the request and if not will generate new randomId --- .../service/impl/MachineSpecificationServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/service/impl/MachineSpecificationServiceImpl.java b/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/service/impl/MachineSpecificationServiceImpl.java index 591a4c7b830..26db3a9ee31 100644 --- a/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/service/impl/MachineSpecificationServiceImpl.java +++ b/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/service/impl/MachineSpecificationServiceImpl.java @@ -124,7 +124,7 @@ public IdAndLanguageCodeID createMachineSpecification(MachineSpecificationDto ma try { - String uniqueId = generateId(); + String uniqueId = machineSpecification.getId() != null ? machineSpecification.getId() : generateId(); machineSpecification.setId(uniqueId); MachineSpecification entity = MetaDataUtils.setCreateMetaData(machineSpecification, MachineSpecification.class);