mysociety / derechoapreguntar-theme

The Alaveteli theme for Derecho a Preguntar (Nicaragua)
https://derechoapreguntar.org/
Other
0 stars 3 forks source link

/body/list/all shows no bodies but it should #44

Closed garethrees closed 9 years ago

garethrees commented 9 years ago

Probably search indexing

crowbot commented 9 years ago

Ah, this is probably because the locale on the public body models is es whereas the site is now running in es_NI.

garethrees commented 9 years ago

I was going to just change all of these to es, but it looks like we'd then end up with some duplicates:

=> select * from public_body_translations where public_body_id = 4117;
  id  | public_body_id | locale | first_letter | short_name | notes | request_email |         name         |       url_name       | publication_scheme |         created_at         |         updated_at         | disclosure_log
------+----------------+--------+--------------+------------+-------+---------------+----------------------+----------------------+--------------------+----------------------------+----------------------------+----------------
 4223 |           4117 | es_NI  |              |            |       |               |                      |                      |                    | 2014-09-23 03:55:25.620792 | 2014-09-23 03:55:25.620792 |
 4135 |           4117 | es     | C            |            |       |               | Correos de Nicaragua | correos_de_nicaragua |                    | 2014-09-02 15:22:21.467971 | 2014-09-02 15:22:21.467971 |
crowbot commented 9 years ago

Done.

foi-staging=> begin;
BEGIN
foi-staging=> select * from public_body_translations where public_body_id = 4117;
foi-staging=> select * from public_body_translations where locale = 'es_NI';
foi-staging=> select count(*) from public_body_translations where locale = 'es_NI';
 count 
-------
    88
(1 row)

foi-staging=> select count(*) from public_body_translations where locale = 'es';
 count 
-------
    88
(1 row)

foi-staging=> delete from public_body_translations where locale = 'es_NI';
DELETE 88
foi-staging=> update public_body_translations set locale = 'es_NI' where locale = 'es';
UPDATE 88
foi-staging=> commit;