Skip to content
Snippets Groups Projects
Commit 484de87e authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Merge branch...

Merge branch '44-bessere-losung-zum-ignorieren-des-fehlenden-zeitbezugs-bei-manchen-herausgebern' into 'dev'

check owner_org against configuration option

See merge request !26
parents 2e07d649 c6c7974e
Branches
Tags
2 merge requests!27Merge dev into master,!26check owner_org against configuration option
......@@ -64,12 +64,13 @@ def validate_extra_groups(data, requireAtLeastOne, errors):
def validate_extras(key, data, errors, context):
extra_errors = {}
isStaNord = ('id',) in data and data[('id',)][:7] == 'StaNord'
isLVermGeo = ('owner_org',) in data and data[('owner_org',)] == '01115337-01d1-4e96-aa8e-9749524889c7'
isUmweltportal = ('owner_org',) in data and data[('owner_org',)] == '09871195-cd0a-4767-9396-276404c940d9'
harvesting = ('ignore_auth' in context) and (context['ignore_auth'] == True)
owner_org = data[('owner_org',)]
lenient_with = config.get('ckanext.odsh.lenient_with','')
is_optional_temporal_start = toolkit.asbool(
config.get('ckanext.odsh.is_optional_temporal_start', False)
) or isStaNord or isLVermGeo or isUmweltportal
) ( harvesting and (owner_org in lenient_with) )
require_at_least_one_category = toolkit.asbool(
config.get('ckanext.odsh.require_at_least_one_category', False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment