Commit cbd0b2d78f154aed2a5520be2af49057e5e9b031

Authored by Sergio Oliveira
1 parent 99d95bd8

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 49  
50 50  
51 51 def robots(request):
52   - if settings.ROBOTS_NOINDEX:
  52 + if getattr(settings, 'ROBOTS_NOINDEX'):
53 53 return HttpResponse('User-agent: *\nDisallow: /',
54 54 content_type='text/plain')
55 55  
... ...