aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-04-09 10:59:37 +0100
committerGareth Rees <gareth@mysociety.org>2014-04-09 11:02:25 +0100
commit1062cea89abf8f7cd75355873ae0051c1d906582 (patch)
treedfeb151953d97e5ef19284bf5c72b6aceab7693d
parentaabf6e5967bf24f47c8c25d638ab8ba2c2db5968 (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.
-rw-r--r--app/views/admin_public_body/import_csv.html.erb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/admin_public_body/import_csv.html.erb b/app/views/admin_public_body/import_csv.html.erb
index 3c56f2005..17394be14 100644
--- a/app/views/admin_public_body/import_csv.html.erb
+++ b/app/views/admin_public_body/import_csv.html.erb
@@ -52,7 +52,10 @@
<p><strong>Supported fields:</strong>
<ul>
- <li><code>name</code> (i18n)</li>
+ <li>
+ <code>name</code> (i18n)
+ <strong>Existing records cannot be renamed</strong>
+ </li>
<li><code>short_name</code> (i18n)</li>
<li><code>request_email</code> (i18n)</li>
<li><code>notes</code> (i18n)</li>