Skip to content

Commit

Permalink
fixes (#1263)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmilljr24 authored Dec 16, 2024
1 parent dbcbeee commit 270a5cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/organizations/importers/csv_import_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def call
catch(:halt_import) do
validate_file

CSV.foreach(@file.to_path, headers: true, skip_blanks: true).with_index(1) do |row, index|
CSV.foreach(@file.to_path, headers: true, skip_blanks: true).with_index(2) do |row, index|
# Header may be different depending on which form applicaiton was used(e.g. google forms) or how it was created(User creates form with "Email Address")
email = row[@email_header].downcase
# Google forms uses "Timestamp", other services may use a different header
csv_timestamp = Time.parse(row["Timestamp"])
csv_timestamp = Time.parse(row["Timestamp"]) if row["Timestamp"].present?

person = Person.find_by(email:, organization: @organization)
previously_matched_form_submission = FormSubmission.where(person:, csv_timestamp:)
Expand Down

0 comments on commit 270a5cc

Please sign in to comment.