Don't let the user specify mutually exclusive configuration options:
- organizations_filter_include - organizations_filter_exclude
This commit is contained in:
parent
f2d8a5f8cc
commit
e8f539a45e
|
@ -147,6 +147,11 @@ class CKANHarvester(HarvesterBase):
|
||||||
if not isinstance(config_obj['default_extras'], dict):
|
if not isinstance(config_obj['default_extras'], dict):
|
||||||
raise ValueError('default_extras must be a dictionary')
|
raise ValueError('default_extras must be a dictionary')
|
||||||
|
|
||||||
|
if 'organizations_filter_include' in config_obj \
|
||||||
|
and 'organizations_filter_exclude' in config_obj:
|
||||||
|
raise ValueError('Harvest configuration cannot contain both '
|
||||||
|
'organizations_filter_include and organizations_filter_exclude')
|
||||||
|
|
||||||
if 'user' in config_obj:
|
if 'user' in config_obj:
|
||||||
# Check if user exists
|
# Check if user exists
|
||||||
context = {'model': model, 'user': toolkit.c.user}
|
context = {'model': model, 'user': toolkit.c.user}
|
||||||
|
|
Loading…
Reference in New Issue