diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-04-09 10:59:37 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-04-09 11:02:25 +0100 |
commit | 1062cea89abf8f7cd75355873ae0051c1d906582 (patch) | |
tree | dfeb151953d97e5ef19284bf5c72b6aceab7693d /spec/controllers/request_controller_spec.rb | |
parent | aabf6e5967bf24f47c8c25d638ab8ba2c2db5968 (diff) |
Clarify import_csv supported fields name attribute
https://github.com/mysociety/alaveteli/issues/1416
- Create a public body with name "Foobar"
- Now try to upload this CSV:
#name,request_email,short_name
Foobar Test,a@example.com,foobar
- The app raises the following exception:
ERROR: duplicate key value violates unique constraint
"index_public_bodies_on_url_name"
DETAIL: Key (url_name)=(foobar) already exists.
---
The reason for this is that the CSV import looks up records by their
Name attribute. By attempting to rename the record, you're inadvertently
creating a new Public Body, since one with the name of "Foobar Test"
does not yet exist.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
0 files changed, 0 insertions, 0 deletions