Skip to content

Commit 5246fe6

Browse files
authored
Merge pull request #66 from amatsuda/oops
Trivial updates
2 parents c70a044 + 9a30782 commit 5246fe6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/models/message.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ def from_string(str)
8787
end
8888
end
8989

90+
def list
91+
@list ||= List.find_by_id(list_id)
92+
end
93+
9094
def count_recursively(count = 0)
9195
count + 1 + (children&.sum(&:count_recursively) || 0)
9296
end

bin/import_mails

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Message.transaction do
3434
STDERR.puts("#{list}:#{seq} already exists in Postgres")
3535
rescue StandardError => e
3636
errors << [seq, e]
37-
STDERR.puts("failed to import #{list}:#{seq}: #{e}")
37+
STDERR.puts("failed to import #{list.name}:#{seq}: #{e}")
3838
end
3939
end
4040
end

0 commit comments

Comments
 (0)