mirror of
https://github.com/elisspace/FxLifeSheet.git
synced 2026-08-29 15:44:00 +00:00
Add additional source info
This commit is contained in:
@@ -45,7 +45,7 @@ module Importers
|
||||
# if you provide a `date`, we will look for the closed alcoholIntake entry, and use the same timestamp
|
||||
# if you provide a `timestamp`, we will use that exact time stamp
|
||||
|
||||
def insert_row_for_date(date:, key:, type:, value:, question:)
|
||||
def insert_row_for_date(date:, key:, type:, value:, question:, source:)
|
||||
raise "invalid type #{type}" unless ["boolean", "range", "number", "text"].include?(type)
|
||||
|
||||
puts "Looking for match on #{date}..."
|
||||
@@ -58,6 +58,7 @@ module Importers
|
||||
new_entry[:question] = question
|
||||
new_entry[:type] = type
|
||||
new_entry[:value] = value
|
||||
new_entry[:source] = source
|
||||
raw_data.insert(new_entry)
|
||||
puts "--- Successfully backfilled entry for #{key} to #{value} on #{new_entry[:yearmonth]}-#{new_entry[:day]}"
|
||||
else
|
||||
|
||||
@@ -15,7 +15,8 @@ module Importers
|
||||
key: key,
|
||||
value: value,
|
||||
type: type,
|
||||
question: question
|
||||
question: question,
|
||||
source: "add_time_range"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user