Commit cbd0b2d78f154aed2a5520be2af49057e5e9b031
1 parent
99d95bd8
Exists in
master
and in
39 other branches
Using getattr to ensure it won't break if missing
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/home/views.py
@@ -49,7 +49,7 @@ def index(request): | @@ -49,7 +49,7 @@ def index(request): | ||
49 | 49 | ||
50 | 50 | ||
51 | def robots(request): | 51 | def robots(request): |
52 | - if settings.ROBOTS_NOINDEX: | 52 | + if getattr(settings, 'ROBOTS_NOINDEX'): |
53 | return HttpResponse('User-agent: *\nDisallow: /', | 53 | return HttpResponse('User-agent: *\nDisallow: /', |
54 | content_type='text/plain') | 54 | content_type='text/plain') |
55 | 55 |