From 7a8b7fedd95679f230cca9b5a67630933c1e5ecb Mon Sep 17 00:00:00 2001 From: karthik-tarento Date: Wed, 6 Jul 2022 19:27:06 +0530 Subject: [PATCH] Fix for org not found in user signup --- .../registration/service/UserRegistrationServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/sunbird/user/registration/service/UserRegistrationServiceImpl.java b/src/main/java/org/sunbird/user/registration/service/UserRegistrationServiceImpl.java index 5ad71d60d..193670fec 100644 --- a/src/main/java/org/sunbird/user/registration/service/UserRegistrationServiceImpl.java +++ b/src/main/java/org/sunbird/user/registration/service/UserRegistrationServiceImpl.java @@ -206,12 +206,18 @@ public void initiateCreateUserFlow(String registrationCode) { userReg.setSbOrgId(orgId); LOGGER.info(String.format("Auto on-boarded organisation with Name: %s, MapId: %s, OrgId: %s", userReg.getOrgName(), userReg.getMapId(), userReg.getSbOrgId())); + // TODO - Need to find a best way to give time for org creation takes effect. + try { + Thread.sleep(1000); + } catch (Exception e) { + } } else { try { LOGGER.error("Failed to auto onboard organisation. Error: " + (new ObjectMapper()).writeValueAsString(orgResponse)); } catch (Exception e) { } + return; } }