Better check for config object

This commit is contained in:
amercader 2012-10-30 16:40:32 +00:00
parent 99dc2a7c55
commit 0444c14da2
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ class SpatialHarvester(object):
3. Default value as defined in DEFAULT_VALIDATOR_PROFILES
'''
if not hasattr(self, '_validator'):
if self.config and self.config.get('validator_profiles',None):
if hasattr(self, 'config') and self.config.get('validator_profiles',None):
profiles = self.config.get('validator_profiles')
elif config.get('ckan.spatial.validator.profiles', None):
profiles = [