diff options
author | Derf Null <derf@finalrewind.org> | 2023-07-03 18:12:34 +0200 |
---|---|---|
committer | Derf Null <derf@finalrewind.org> | 2023-07-03 18:12:34 +0200 |
commit | c9bae6fcee739e057f95512f9a3d56afcfaf84e8 (patch) | |
tree | f80a5ce6cbf775f58db77b43ad55af6712dda27d /lib/Travelynx/Model | |
parent | a608ca6781c50ac170d347663a531850ab922cb0 (diff) |
journeys: simplify visibily check
Diffstat (limited to 'lib/Travelynx/Model')
-rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index aaaa9be..a811a7c 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -562,18 +562,7 @@ sub get { if ( $visibility_atoi{ $opt{min_visibility} } ) { $opt{min_visibility} = $visibility_atoi{ $opt{min_visibility} }; } - if ( $opt{with_default_visibility} ) { - $where{visibility} = [ - -or => { '=', undef }, - { '>=', $opt{min_visibility} } - ]; - } - else { - $where{visibility} = [ - -and => { '!=', undef }, - { '>=', $opt{min_visibility} } - ]; - } + $where{effective_visibility} = { '>=', $opt{min_visibility} }; } my @travels; |