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