mysociety / yournextrepresentative

A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk/
GNU Affero General Public License v3.0
56 stars 21 forks source link

Fixes for SiteSettings objects not existing #987

Closed mhl closed 7 years ago

mhl commented 7 years ago

There are two important situations where a SiteSettings object might not have been created:

In both those situations, migration 0032_sitesettings in candidates is run before a site or a user exists, so the SiteSettings can't be created. This means that we need to take steps to make sure that the site still works when no SiteSettings object has been created.