Improved error handling if proposed calendar is not valid.
This commit is contained in:
parent
6ae6ee44ba
commit
9775af5e98
1 changed files with 3 additions and 1 deletions
|
@ -38,7 +38,9 @@ returns calendar object
|
|||
|
||||
# call for calendar suggestion
|
||||
calendar_details = Service::GeoCalendar.location(ip)
|
||||
return if !calendar_details
|
||||
return if calendar_details.blank?
|
||||
return if calendar_details['name'].blank?
|
||||
return if calendar_details['business_hours'].blank?
|
||||
|
||||
calendar_details['name'] = Calendar.generate_uniq_name(calendar_details['name'])
|
||||
calendar_details['default'] = true
|
||||
|
|
Loading…
Reference in a new issue