diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-08-04 12:19:12 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-08-04 12:23:03 +0100 |
commit | 628abe70a91343c9fe026872fa1021243330a097 (patch) | |
tree | 93cc9cfde7333894d12fda950f813c7f03678abb | |
parent | ff9be5046c4ad4c8812f7175acbf382ec37209aa (diff) |
Quote body name in stats csv export
Some Public Body names contain commas (or other characters) which lead
to a malformed CSV where parts of the body name are in later columns.
-rw-r--r-- | lib/tasks/stats.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/stats.rake b/lib/tasks/stats.rake index f09594529..46a645b4d 100644 --- a/lib/tasks/stats.rake +++ b/lib/tasks/stats.rake @@ -119,7 +119,7 @@ DESC count ? count : 0 end - row = [body.name] + stats + row = [%Q("#{ body.name }")] + stats puts row.join(",") end end @@ -147,7 +147,7 @@ DESC count ? count : 0 end - row = [body.name] + stats + row = [%Q("#{ body.name }")] + stats puts row.join(",") end end |