Fixed error matching housing availability
This commit is contained in:
		
							parent
							
								
									cfd5fa6077
								
							
						
					
					
						commit
						43e6a14378
					
				| @ -1158,6 +1158,7 @@ module ApplicationHelper | |||||||
| 	end | 	end | ||||||
| 
 | 
 | ||||||
| 	def available_dates_match?(host, guest) | 	def available_dates_match?(host, guest) | ||||||
|  | 		return false unless host.housing_data['availability'].present? && host.housing_data['availability'][1].present? | ||||||
| 		if host.housing_data['availability'][0] <= guest.arrival && | 		if host.housing_data['availability'][0] <= guest.arrival && | ||||||
| 		 	host.housing_data['availability'][1] >= guest.departure | 		 	host.housing_data['availability'][1] >= guest.departure | ||||||
| 		 	return true | 		 	return true | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user