From 12d1a962c66d49736a6e908fc64cdfda6c295424 Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Mon, 11 Sep 2017 09:53:13 +0000
Subject: [PATCH] SSDM-5624 : Big logs bugfix

SVN: 38709
---
 .../html/js/views/SampleForm/SampleFormController.js        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js
index 98609399712..1a70cb241d7 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js
@@ -401,11 +401,11 @@ function SampleFormController(mainController, mode, sample) {
 				var searchUntilFound = null;
 				    searchUntilFound = function() {
 					mainController.serverFacade.searchWithIdentifiers([sampleIdentifierToOpen], function(data) {
-						if(data && data.length === 1) {
+						if(data && data.length > 0) {
 							mainController.changeView('showViewSamplePageFromPermId',data[0].permId);
 							Util.unblockUI();
-						} else { //Recursive call
-							searchUntilFound();
+						} else { // Recursive call, only if not found yet due to reindexing
+							setTimeout(searchUntilFound, 100);
 						}
 					});
 				}
-- 
GitLab