summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Model
diff options
context:
space:
mode:
authorDerf Null <derf@finalrewind.org>2023-07-03 18:12:34 +0200
committerDerf Null <derf@finalrewind.org>2023-07-03 18:12:34 +0200
commitc9bae6fcee739e057f95512f9a3d56afcfaf84e8 (patch)
treef80a5ce6cbf775f58db77b43ad55af6712dda27d /lib/Travelynx/Model
parenta608ca6781c50ac170d347663a531850ab922cb0 (diff)
journeys: simplify visibily check
Diffstat (limited to 'lib/Travelynx/Model')
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm13
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;