From 30cc6679029e26355caa1a979735e0688b464fc8 Mon Sep 17 00:00:00 2001 From: nmenda Date: Wed, 20 Jan 2016 16:34:37 -0500 Subject: [PATCH] do not show obsolete loci in search --- lib/SGN/Controller/AJAX/Search/Loci.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/SGN/Controller/AJAX/Search/Loci.pm b/lib/SGN/Controller/AJAX/Search/Loci.pm index 08b5693ad..ccfc89e23 100644 --- a/lib/SGN/Controller/AJAX/Search/Loci.pm +++ b/lib/SGN/Controller/AJAX/Search/Loci.pm @@ -33,6 +33,8 @@ sub locus_search :Path('/ajax/search/loci') Args(0) { my $any_name = $params->{any_name}; my ($or_conditions, $and_conditions); + $and_conditions->{ 'me.obsolete' } => 'f' ; + if (exists($params->{any_name} ) && $params->{any_name} ) { my $start = '%'; my $end = '%'; @@ -150,7 +152,8 @@ sub locus_search :Path('/ajax/search/loci') Args(0) { { -and => [ $or_conditions, - $and_conditions + $and_conditions, + 'me.obsolete' => 'f' ], }, { @@ -168,7 +171,8 @@ sub locus_search :Path('/ajax/search/loci') Args(0) { { -and => [ $or_conditions, - $and_conditions + $and_conditions, + 'me.obsolete' => 'f' ], } , { -- 2.11.4.GIT