[fix]Fix empty string check
This commit is contained in:
parent
83ecd98997
commit
8ff3958685
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ class Program < ApplicationRecord
|
||||||
# * +True+ -> If there is any event for the given date
|
# * +True+ -> If there is any event for the given date
|
||||||
# * +False+ -> If there is not any event for the given date
|
# * +False+ -> If there is not any event for the given date
|
||||||
def any_event_for_this_date?(date)
|
def any_event_for_this_date?(date)
|
||||||
return false if date.nil? || date.empty?
|
return false if date.nil? || date == ''
|
||||||
return false unless selected_schedule.present?
|
return false unless selected_schedule.present?
|
||||||
|
|
||||||
parsed_date = DateTime.parse("#{date} 00:00").utc
|
parsed_date = DateTime.parse("#{date} 00:00").utc
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue