Skip to content
Snippets Groups Projects
Commit ab703143 authored by anonymous's avatar anonymous
Browse files

fix validation

parent 94a98f74
Branches
Tags
No related merge requests found
......@@ -52,8 +52,8 @@ def validate_extra_groups(data, requireAtLeastOne, errors):
data[('groups', num, 'id')] = group
else: # no extra-field 'groups'
# dataset might come from a harvest process
if not data.get(('groups', 0, 'id'), False) and not \
(data.get('groups', False) and len(data.get('groups'))>0):
if not data.get(('groups', 0, 'id'), False) and \
not data.get(('groups', 0, 'name'), False):
errors['groups']= 'at least one group needed'
def validate_extras(key, data, errors, context):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment