|  |  | @ -174,9 +174,8 @@ class BulkUpload::Lettings::Validator | 
			
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |   end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   def create_logs? |  |  |  |   def create_logs? | 
			
		
	
		
		
			
				
					
					|  |  |  |     # return false if any_setup_sections_incomplete? |  |  |  |     return false if any_setup_sections_incomplete? | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     return false if over_column_error_threshold? |  |  |  |     return false if over_column_error_threshold? | 
			
		
	
		
		
			
				
					
					|  |  |  |     return false if duplicate_log_already_exists? |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     row_parsers.all? { |row_parser| row_parser.log.valid? } |  |  |  |     row_parsers.all? { |row_parser| row_parser.log.valid? } | 
			
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |   end | 
			
		
	
	
		
		
			
				
					|  |  | @ -204,16 +203,6 @@ private | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |   end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   def duplicate_log_already_exists? |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     fields = ["lettype", "beds"] |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     fields.all? do |field| |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       count = row_parsers.count { |row_parser| LettingsLog.where("#{field}": row_parser.attributes[field]).present? } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       count > 0 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   def csv_parser |  |  |  |   def csv_parser | 
			
		
	
		
		
			
				
					
					|  |  |  |     @csv_parser ||= BulkUpload::Lettings::CsvParser.new(path:) |  |  |  |     @csv_parser ||= BulkUpload::Lettings::CsvParser.new(path:) | 
			
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |   end | 
			
		
	
	
		
		
			
				
					|  |  | 
 |