mysociety/alaveteli — pull request #1314 by mhl (2014-01-09 18:11:46+00:00)
Title: Ignore translations when finding the internal admin body

If you change the default locale after having set up your site,
and exception would always be thrown by
PublicBody.internal_admin_body, which looks up that distinguished
body based on url_name. Since that's a translated field, and
there would be no translation for it in the new locale, it
wouldn't be found, and the code would try to create a second
internal_admin_body, which would fail because of the url_name
being non-unque in public_bodies.

There are various ways of fixing this; the one introduced in this
commit is to use raw SQL to find the public body, bypassing the
public_body_translations table.