Browse Source

Remove redundant methods

pull/1665/head
Kat 3 years ago
parent
commit
59ccaca244
  1. 4
      app/services/bulk_upload/lettings/year2023/csv_parser.rb
  2. 4
      app/services/bulk_upload/sales/year2023/csv_parser.rb

4
app/services/bulk_upload/lettings/year2023/csv_parser.rb

@ -101,10 +101,6 @@ private
@normalised_string
end
def has_field_in_header?(field)
rows[rows.find_index { |row| row[0].match(/field number/i) }].any? { |cell| cell&.match?(/#{field}/i) }
end
def first_record_start_date
if with_headers?
Date.new(row_parsers.first.field_98.to_i + 2000, row_parsers.first.field_97.to_i, row_parsers.first.field_96.to_i)

4
app/services/bulk_upload/sales/year2023/csv_parser.rb

@ -96,10 +96,6 @@ private
@normalised_string
end
def has_field_in_header?(field)
rows[rows.find_index { |row| row[0].match(/field number/i) }].any? { |cell| cell&.match?(/#{field}/i) }
end
def first_record_start_date
if with_headers?
Date.new(row_parsers.first.field_4.to_i + 2000, row_parsers.first.field_3.to_i, row_parsers.first.field_2.to_i)

Loading…
Cancel
Save