check empty for checkout time and checkout alert time

This commit is contained in:
phyusin
2018-01-16 14:59:47 +06:30
parent d152d62e80
commit bc2d6e07f1
3 changed files with 4 additions and 4 deletions

View File

@@ -80,7 +80,7 @@ class DiningFacility < ApplicationRecord
if booking
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
free_time_min = 0
if !lookup_checkout_time.nil?
if !lookup_checkout_time.empty?
now = Time.now.utc
lookup_checkout_time.each do |checkout_time|
arr_time = checkout_time[0].split("-")
@@ -119,7 +119,7 @@ class DiningFacility < ApplicationRecord
if bookings
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
free_time_min = 0
if !lookup_checkout_time.nil?
if !lookup_checkout_time.empty?
now = Time.now.utc
lookup_checkout_time.each do |checkout_time|
arr_time = checkout_time[0].split("-")