From 02f46d90e2ba4d3dd94ddb06520f73106e3da301 Mon Sep 17 00:00:00 2001 From: chiu Date: Sat, 23 May 2020 14:33:03 +0800 Subject: [PATCH] fix error --- app/models/property.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/property.rb b/app/models/property.rb index 065ab0c..a9adfb1 100644 --- a/app/models/property.rb +++ b/app/models/property.rb @@ -92,7 +92,7 @@ class Property available = false end if available - bookings = phires.where(:recurring_end_date.gte => stime, :recurring => true) + phires.where(:recurring => false) + bookings = phires.where(:recurring_end_date.gte => stime, :recurring => true) + phires.where(:recurring => false,:recurring_end_date => nil) + phires.where(:recurring => false,:recurring_end_date.gte => stime) case interval when 'week' d_step = 1.week