From 79bf7d9694cb37f434a550c9d71c150b2b561bf5 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 19 May 2020 23:24:00 +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 cec836d..e9726d5 100644 --- a/app/models/property.rb +++ b/app/models/property.rb @@ -119,7 +119,7 @@ class Property sdata = stime_tp.wday*10000 + stime_tp.hour*100 + stime_tp.minute edata = etime_tp.wday*10000 + etime_tp.hour*100 + etime_tp.minute end - if (b_sdata <= sdata && b_edata >= sdata) || (b_sdata >= sdata && b_edata <= edata) || (b_sdata <= edata && b_edata >= edata) + if (sdata <= b_sdata && edata >= b_sdata) || (sdata >= b_sdata && edata <= b_edata) || (sdata <= b_edata && edata >= b_edata) available = false end stime_tp = stime_tp + d_step