diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/public_body.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index a476db8c0..c19433704 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -53,7 +53,7 @@ class PublicBody < ActiveRecord::Base # XXX - Don't like repeating this! def calculate_cached_fields(t) - t.first_letter = t.name.scan(/^./mu)[0].upcase + t.first_letter = t.name.scan(/^./mu)[0].upcase unless t.name.nil? or t.name.empty? short_long_name = t.name short_long_name = t.short_name if t.short_name and !t.short_name.empty? t.url_name = MySociety::Format.simplify_url_part(short_long_name, 'body') |