Skip to content

Commit fef3d25

Browse files
committed
Check against expected RTIRSearchEnabled value
Previously we only checked for a truthy value when deciding if RTIRSearchEnabled was true. We should explicitly check for the string value 'Yes' so that other values like 'No' do not result in a false positive.
1 parent 148cda0 commit fef3d25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

html/Callbacks/RTIR/Elements/ShowSearch/ModifySearch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if ( $ARGS{'SavedSearch'} ) {
5656
}
5757

5858
return
59-
unless $m->request_comp->path =~ m{^/RTIR/} || ( $search && $search->GetOption('RTIRSearchEnabled') );
59+
unless $m->request_comp->path =~ m{^/RTIR/} || ( $search && ($search->GetOption('RTIRSearchEnabled') // '') eq 'Yes' );
6060

6161
# HTMX search requests will have the constituency added as a query param
6262
if ( my $c = $ARGS{'ConstituencyFilter'} ) {

0 commit comments

Comments
 (0)